/* ─── Variables ─────────────────────────────────────────────────────────────── */
:root {
    --rc-red:        #e30613;
    --rc-red-dark:   #b50010;
    --rc-red-light:  #fff0f0;
    --rc-gray-100:   #f7f7f7;
    --rc-gray-200:   #eeeeee;
    --rc-gray-400:   #b0b0b0;
    --rc-gray-600:   #666666;
    --rc-gray-900:   #1a1a1a;
    --rc-white:      #ffffff;
    --rc-radius:     10px;
    --rc-radius-lg:  16px;
    --rc-shadow:     0 4px 24px rgba(0,0,0,.08);
    --rc-transition: 0.18s ease;
    --rc-font:       'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ─── Wrapper ────────────────────────────────────────────────────────────────── */
.rc-wrapper {
    font-family: var(--rc-font);
    color: var(--rc-gray-900);
    max-width: 860px;
    margin: 0 auto;
}

/* ─── Alerts ─────────────────────────────────────────────────────────────────── */
.rc-alert {
    padding: 16px 20px;
    border-radius: var(--rc-radius);
    margin-bottom: 24px;
    font-size: .95rem;
    line-height: 1.5;
}
.rc-alert--success {
    background: #f0fdf4;
    border-left: 4px solid #16a34a;
    color: #166534;
}
.rc-alert--error {
    background: #fff0f0;
    border-left: 4px solid var(--rc-red);
    color: #7f1d1d;
}

/* ─── Secciones ──────────────────────────────────────────────────────────────── */
.rc-section {
    border: none;
    border-radius: var(--rc-radius-lg);
    background: var(--rc-white);
    box-shadow: var(--rc-shadow);
    padding: 24px 28px 28px;
    margin-bottom: 24px;
}

.rc-section__title {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--rc-red);
    border-bottom: 2px solid var(--rc-red);
    padding-bottom: 8px;
    margin-bottom: 20px;
    width: 100%;
}

/* ─── Grid ───────────────────────────────────────────────────────────────────── */
.rc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.rc-grid--empresa {
    grid-template-columns: 2fr 1fr 1fr;
}

.rc-field--full {
    grid-column: 1 / -1;
}

/* ─── Campos ─────────────────────────────────────────────────────────────────── */
.rc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rc-field label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--rc-gray-600);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.rc-field input[type="text"],
.rc-field input[type="email"],
.rc-field input[type="tel"],
.rc-field input[type="number"],
.rc-field select,
.rc-field textarea {
    padding: 11px 14px;
    border: 1.5px solid var(--rc-gray-200);
    border-radius: var(--rc-radius);
    font-size: .95rem;
    font-family: var(--rc-font);
    color: var(--rc-gray-900);
    background: var(--rc-gray-100);
    transition: border-color var(--rc-transition), background var(--rc-transition), box-shadow var(--rc-transition);
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.rc-field input:focus,
.rc-field select:focus,
.rc-field textarea:focus {
    border-color: var(--rc-red);
    background: var(--rc-white);
    box-shadow: 0 0 0 3px rgba(227,6,19,.12);
}

.rc-field textarea {
    resize: vertical;
    min-height: 120px;
}

.rc-req {
    color: var(--rc-red);
    font-weight: 700;
}

.rc-optional {
    font-size: .78rem;
    color: var(--rc-gray-400);
    font-weight: 400;
}

/* ─── Grupos de empresa ──────────────────────────────────────────────────────── */
.rc-empresa-group {
    padding: 16px;
    border-radius: var(--rc-radius);
    background: var(--rc-gray-100);
    margin-bottom: 4px;
}

.rc-empresa-label {
    margin: 0 0 12px;
    font-size: .9rem;
    font-weight: 700;
    color: var(--rc-gray-600);
}

/* ─── Radios ─────────────────────────────────────────────────────────────────── */
.rc-radio-group {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.rc-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 20px;
    border: 1.5px solid var(--rc-gray-200);
    border-radius: 999px;
    transition: border-color var(--rc-transition), background var(--rc-transition);
    user-select: none;
}

.rc-radio-label:has(input:checked) {
    border-color: var(--rc-red);
    background: var(--rc-red-light);
    color: var(--rc-red-dark);
    font-weight: 600;
}

.rc-radio-label input[type="radio"] {
    accent-color: var(--rc-red);
    width: 18px;
    height: 18px;
}

/* ─── File input ─────────────────────────────────────────────────────────────── */
.rc-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

.rc-file-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    border: 2px dashed var(--rc-gray-400);
    border-radius: var(--rc-radius);
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
    color: var(--rc-gray-600);
    transition: border-color var(--rc-transition), color var(--rc-transition);
    width: fit-content;
}

.rc-file-label:hover {
    border-color: var(--rc-red);
    color: var(--rc-red);
}

.rc-file-icon {
    font-size: 1.2rem;
}

.rc-file-hint {
    font-size: 1.6rem;
    color: var(--rc-gray-400);
    margin: 8px 0 0;
    line-height: 1.5;
}

.rc-file-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rc-file-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    padding: 6px 10px;
    background: var(--rc-gray-100);
    border-radius: 6px;
    color: var(--rc-gray-600);
}

.rc-file-list li::before {
    content: '📄';
}

/* ─── Botón submit ───────────────────────────────────────────────────────────── */
.rc-submit-wrapper {
    text-align: right;
    margin-top: 8px;
}

.rc-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 40px;
    background: var(--rc-red);
    color: var(--rc-white);
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--rc-font);
    cursor: pointer;
    transition: background var(--rc-transition), transform var(--rc-transition), box-shadow var(--rc-transition);
    box-shadow: 0 4px 16px rgba(227,6,19,.28);
    letter-spacing: .02em;
}

.rc-btn:hover:not(:disabled) {
    background: var(--rc-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(227,6,19,.35);
}

.rc-btn:disabled {
    opacity: .7;
    cursor: not-allowed;
    transform: none;
}

.rc-btn__spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rc-spin .7s linear infinite;
}

.rc-btn--loading .rc-btn__spinner {
    display: block;
}

@keyframes rc-spin {
    to { transform: rotate(360deg); }
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
    .rc-section { padding: 18px 16px 20px; }
    .rc-grid { grid-template-columns: 1fr; }
    .rc-grid--empresa { grid-template-columns: 1fr; }
    .rc-submit-wrapper { text-align: center; }
    .rc-btn { width: 100%; }
}
