/* Fase 9.3 — CSS verbatim de los bloques de estilo de Pages/CCC/Components/Modals/ModalCompromiso.razor. Igual que hoy, es global mientras el componente está en pantalla:
   se enlaza con <link> donde estaba el bloque. Cambios: @@ → @ y capas D-51. */
.cc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
}

.cc-modal {
    background: #ffffff;
    border-radius: 12px;
    max-height: 90vh;
    overflow-y: auto;
    border: 0.5px solid #e5e7eb;
}

.cc-modal-wide {
    width: 560px;
}

.cc-modal-md {
    width: 480px;
}

.cc-modal-sm {
    width: 420px;
}

.cc-modal-header {
    padding: 14px 18px;
    border-bottom: 0.5px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cc-modal-title {
    font-size: 14px;
    font-weight: 500;
    color: #1a1d23;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cc-modal-body {
    padding: 16px 18px;
}

.cc-modal-footer {
    padding: 12px 18px;
    border-top: 0.5px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Forms */
.cc-form-group {
    margin-bottom: 12px;
}

.cc-form-label {
    font-size: 12px;
    font-weight: 500;
    color: #1a1d23;
    margin-bottom: 4px;
    display: block;
}

.cc-label-amber {
    color: #d97706;
}

.cc-form-select,
.cc-form-input {
    width: 100%;
    padding: 7px 10px;
    border: 0.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 12px;
    color: #1a1d23;
    background: #ffffff;
    box-sizing: border-box;
}

    .cc-form-select:focus,
    .cc-form-input:focus {
        outline: none;
        border-color: #93c5fd;
    }

.cc-textarea {
    height: 60px;
    resize: none;
}

.cc-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

/* PDF preview */
.cc-preview-box {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
    border: 0.5px solid #e5e7eb;
}

.cc-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cc-preview-logo {
    font-size: 14px;
    font-weight: 500;
    color: #2563eb;
}

.cc-preview-date {
    font-size: 11px;
    color: #6b7280;
}

.cc-preview-client {
    font-size: 11px;
    margin-bottom: 8px;
}

.cc-preview-total {
    margin-top: 8px;
    text-align: right;
    font-size: 12px;
    font-weight: 500;
    color: #dc2626;
}

.cc-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

    .cc-preview-table th {
        text-align: left;
        padding: 4px 6px;
        border-bottom: 0.5px solid #e5e7eb;
        color: #6b7280;
        font-weight: 500;
    }

    .cc-preview-table td {
        padding: 4px 6px;
        border-bottom: 0.5px solid #e5e7eb;
        color: #1a1d23;
    }

.amount-red {
    color: #dc2626;
}

.amount-amber {
    color: #d97706;
}

/* Send options */
.cc-send-options {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.cc-send-option {
    flex: 1;
    padding: 8px;
    border: 0.5px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all .15s;
}

    .cc-send-option:hover,
    .cc-send-option.selected {
        border-color: #2563eb;
        background: #eff6ff;
    }

    .cc-send-option i {
        font-size: 18px;
        display: block;
        margin-bottom: 3px;
    }

    .cc-send-option span {
        font-size: 11px;
        color: #6b7280;
    }

/* Compromiso */
.cc-compromiso-box {
    background: #fffbeb;
    padding: 10px;
    border-radius: 8px;
    border: 0.5px solid #fcd34d;
}

/* Buttons */
.cc-btn {
    padding: 5px 10px;
    border-radius: 8px;
    border: 0.5px solid #e5e7eb;
    background: #ffffff;
    color: #1a1d23;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all .15s;
}

    .cc-btn:hover {
        background: #f3f4f6;
    }

.cc-btn-primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

    .cc-btn-primary:hover {
        background: #1d4ed8;
    }

/* Badges */
.cc-badge {
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
}

.badge-red {
    background: #fef2f2;
    color: #dc2626;
}

.badge-amber {
    background: #fffbeb;
    color: #d97706;
}

.badge-green {
    background: #f0fdf4;
    color: #16a34a;
}

.badge-blue {
    background: #eff6ff;
    color: #2563eb;
}

/* ═══ Añadidos: validación, grid de 3 y spinner ══════════════ */
.cc-form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.cc-chk-inline {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: #374151;
    margin-top: 4px;
}

    .cc-chk-inline input {
        width: 15px;
        height: 15px;
        accent-color: #1a4fba;
        margin: 0;
    }

.cc-form-error {
    margin-top: 10px;
    padding: 8px 11px;
    border-radius: 5px;
    background: #fef2f2;
    border: 1px solid #f5cfcb;
    color: #b42318;
    font-size: 12.5px;
    font-weight: 600;
}

.cc-form-hint {
    display: block;
    margin-top: 4px;
    font-size: 11.5px;
    color: #6b7280;
}

.cc-link-btn {
    background: none;
    border: none;
    padding: 0 0 0 4px;
    color: #1a4fba;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
}

.cc-spin-sm {
    display: inline-block;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ccModalSpin 0.8s linear infinite;
}

@keyframes ccModalSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 520px) {
    .cc-form-grid-3 {
        grid-template-columns: 1fr;
    }
}
