/* WooCommerce Constancia Fiscal OCR - Frontend Styles v2 */

/* ==========================================================================
   Variables
   ========================================================================== */
:root {
    --csf-primary: #224eca;
    --csf-primary-dark: #1a3da8;
    --csf-success: #28a745;
    --csf-warning: #ffc107;
    --csf-danger: #dc3545;
    --csf-gray-100: #f8f9fa;
    --csf-gray-200: #e9ecef;
    --csf-gray-300: #dee2e6;
    --csf-gray-600: #6c757d;
    --csf-gray-800: #343a40;
}

/* ==========================================================================
   Secciones generales
   ========================================================================== */
.wc-csf-datos-fiscales,
.wc-csf-direcciones-envio {
    max-width: 800px;
}

.wc-csf-datos-fiscales h3,
.wc-csf-direcciones-envio h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--csf-primary);
    color: var(--csf-gray-800);
}

.wc-csf-section {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--csf-gray-100);
    border-radius: 6px;
}

.wc-csf-section h4 {
    margin: 0 0 15px 0;
    color: var(--csf-primary);
    font-size: 16px;
}

/* ==========================================================================
   Estado de sincronización
   ========================================================================== */
.wc-csf-sync-status {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.wc-csf-sync-ok {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wc-csf-sync-ok .dashicons {
    color: var(--csf-success);
}

/* ==========================================================================
   Público en General Box
   ========================================================================== */
.wc-csf-publico-general-box {
    background: #fff3cd;
    border: 1px solid var(--csf-warning);
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 25px;
}

.wc-csf-publico-general-box .description {
    margin: 8px 0 0 28px;
    color: #856404;
    font-size: 13px;
}

/* ==========================================================================
   Upload Section
   ========================================================================== */
.wc-csf-upload-section {
    background: #e8f4fd;
    border: 2px dashed var(--csf-primary);
    border-radius: 6px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: center;
}

.wc-csf-upload-section h4 {
    margin: 0 0 10px 0;
    color: var(--csf-primary);
}

.wc-csf-upload-section .description {
    margin-bottom: 15px;
    color: var(--csf-gray-600);
}

.wc-csf-upload-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

#csf-select-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#csf-file-name {
    color: var(--csf-gray-600);
    font-style: italic;
}

#csf-processing {
    margin-top: 15px;
    color: var(--csf-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ==========================================================================
   Formulario
   ========================================================================== */
.wc-csf-form .form-row {
    margin-bottom: 15px;
}

.wc-csf-form .form-row-first {
    width: 48%;
    float: left;
    clear: left;
}

.wc-csf-form .form-row-last {
    width: 48%;
    float: right;
}

.wc-csf-form .form-row-wide {
    width: 100%;
    clear: both;
}

.wc-csf-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--csf-gray-800);
}

.wc-csf-form .required {
    color: var(--csf-danger);
}

.wc-csf-form .description {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #888;
}

.wc-csf-form input[type="text"],
.wc-csf-form input[type="tel"],
.wc-csf-form input[type="email"],
.wc-csf-form select,
.wc-csf-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--csf-gray-300);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wc-csf-form input:focus,
.wc-csf-form select:focus,
.wc-csf-form textarea:focus {
    border-color: var(--csf-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 78, 202, 0.1);
}

#csf-rfc-type {
    display: inline-block;
    margin-top: 5px;
    padding: 3px 10px;
    background: var(--csf-gray-200);
    border-radius: 3px;
    font-size: 12px;
    color: var(--csf-gray-600);
}

/* ==========================================================================
   Acciones
   ========================================================================== */
.wc-csf-actions {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--csf-gray-300);
    display: flex;
    align-items: center;
    gap: 15px;
    clear: both;
}

.wc-csf-actions .button-primary,
button.button-primary {
    background: var(--csf-primary) !important;
    border-color: var(--csf-primary) !important;
    color: #fff !important;
    padding: 10px 25px !important;
    height: auto !important;
    font-size: 14px !important;
    border-radius: 4px !important;
}

.wc-csf-actions .button-primary:hover,
button.button-primary:hover {
    background: var(--csf-primary-dark) !important;
    border-color: var(--csf-primary-dark) !important;
}

#csf-save-status .csf-success {
    color: var(--csf-success);
    font-weight: 500;
}

#csf-save-status .csf-error {
    color: var(--csf-danger);
    font-weight: 500;
}

/* ==========================================================================
   Checkbox y Radio
   ========================================================================== */
.wc-csf-checkbox-label,
.wc-csf-radio-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.wc-csf-checkbox-label input[type="checkbox"],
.wc-csf-radio-option input[type="radio"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--csf-primary);
}

/* ==========================================================================
   Direcciones de Envío - Lista
   ========================================================================== */
.wc-csf-addresses-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.wc-csf-address-card {
    background: #fff;
    border: 1px solid var(--csf-gray-300);
    border-radius: 8px;
    padding: 20px;
    position: relative;
    transition: all 0.2s;
}

.wc-csf-address-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.wc-csf-address-card.is-default {
    border-color: var(--csf-primary);
    border-width: 2px;
}

.wc-csf-default-badge {
    position: absolute;
    top: -10px;
    right: 15px;
    background: var(--csf-primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
}

.wc-csf-address-card h4 {
    margin: 0 0 10px 0;
    color: var(--csf-gray-800);
    font-size: 16px;
}

.wc-csf-address-card .address-receptor {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--csf-gray-800);
}

.wc-csf-address-card .address-detail {
    color: var(--csf-gray-600);
    margin: 3px 0;
    font-size: 13px;
    line-height: 1.5;
}

.wc-csf-address-card .address-phone {
    color: #888;
    font-size: 12px;
    margin-top: 10px;
}

.wc-csf-address-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--csf-gray-200);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.wc-csf-address-actions .button {
    padding: 6px 14px !important;
    font-size: 12px !important;
    border-radius: 4px !important;
}

.wc-csf-no-addresses {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #888;
    background: var(--csf-gray-100);
    border-radius: 6px;
}

#csf-add-address {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   Modal
   ========================================================================== */
.wc-csf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wc-csf-modal-content {
    background: #fff;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.wc-csf-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    transition: color 0.2s;
}

.wc-csf-modal-close:hover {
    color: var(--csf-gray-800);
}

.wc-csf-modal-content h3 {
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--csf-primary);
}

.wc-csf-modal-actions {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--csf-gray-300);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ==========================================================================
   Checkout
   ========================================================================== */
.wc-csf-checkout-section {
    background: var(--csf-gray-100);
    border: 1px solid var(--csf-gray-300);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.wc-csf-checkout-section h3 {
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--csf-primary);
    font-size: 18px;
    color: var(--csf-gray-800);
}

.wc-csf-fiscal-options,
.wc-csf-address-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wc-csf-radio-option {
    background: #fff;
    border: 2px solid var(--csf-gray-300);
    border-radius: 6px;
    padding: 15px 20px;
    transition: all 0.2s;
}

.wc-csf-radio-option:hover {
    border-color: var(--csf-primary);
}

.wc-csf-radio-option:has(input:checked) {
    border-color: var(--csf-primary);
    background: #f0f4ff;
}

.wc-csf-radio-option span {
    flex: 1;
}

.wc-csf-radio-option strong {
    color: var(--csf-primary);
}

.wc-csf-no-fiscal {
    background: #fff3cd;
    border: 1px solid var(--csf-warning);
    border-radius: 6px;
    padding: 15px 20px;
    color: #856404;
}

.wc-csf-no-fiscal a {
    color: var(--csf-primary);
    font-weight: 600;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .wc-csf-form .form-row-first,
    .wc-csf-form .form-row-last {
        width: 100%;
        float: none;
    }
    
    .wc-csf-addresses-list {
        grid-template-columns: 1fr;
    }
    
    .wc-csf-modal-content {
        padding: 20px;
        margin: 10px;
    }
    
    .wc-csf-address-actions {
        flex-direction: column;
    }
    
    .wc-csf-address-actions .button {
        width: 100%;
        text-align: center;
    }
    
    .wc-csf-checkout-section {
        padding: 15px;
    }
}

/* ==========================================================================
   Clear floats
   ========================================================================== */
.wc-csf-section::after,
.wc-csf-form::after {
    content: "";
    display: table;
    clear: both;
}

/* ==========================================================================
   Mis Facturas
   ========================================================================== */
.wc-csf-mis-facturas h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--csf-primary);
    color: var(--csf-gray-800);
}

.wc-csf-no-invoices {
    text-align: center;
    padding: 60px 20px;
    background: var(--csf-gray-100);
    border-radius: 8px;
}

.wc-csf-no-invoices .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: var(--csf-gray-300);
    margin-bottom: 15px;
}

.wc-csf-no-invoices p {
    color: var(--csf-gray-600);
    margin: 0;
}

.wc-csf-no-invoices .description {
    font-size: 13px;
    margin-top: 8px;
}

.wc-csf-invoices-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

.wc-csf-invoices-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.wc-csf-invoices-table thead th {
    background: var(--csf-primary);
    color: #fff;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wc-csf-invoices-table thead th:first-child {
    border-radius: 6px 0 0 0;
}

.wc-csf-invoices-table thead th:last-child {
    border-radius: 0 6px 0 0;
}

.wc-csf-invoices-table tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--csf-gray-200);
    vertical-align: middle;
}

.wc-csf-invoices-table tbody tr:hover td {
    background: var(--csf-gray-100);
}

.wc-csf-invoices-table tbody tr.invoice-cancelled td {
    opacity: 0.6;
    text-decoration: line-through;
}

.wc-csf-invoices-table tbody tr.invoice-cancelled td .wc-csf-status,
.wc-csf-invoices-table tbody tr.invoice-cancelled td .invoice-actions {
    text-decoration: none;
}

.wc-csf-invoices-table .invoice-uuid-row td {
    padding: 8px 15px;
    background: var(--csf-gray-100);
    border-bottom: 2px solid var(--csf-gray-300);
}

.wc-csf-invoices-table .invoice-uuid-row.invoice-cancelled td {
    text-decoration: none;
}

.wc-csf-invoices-table .uuid-label {
    color: var(--csf-gray-600);
    margin-right: 8px;
}

.wc-csf-invoices-table .invoice-uuid {
    font-size: 11px;
    background: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    border: 1px solid var(--csf-gray-300);
    word-break: break-all;
}

.wc-csf-invoices-table .csf-copy-uuid {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    color: var(--csf-gray-600);
    vertical-align: middle;
}

.wc-csf-invoices-table .csf-copy-uuid:hover {
    color: var(--csf-primary);
}

.wc-csf-invoices-table .invoice-actions {
    white-space: nowrap;
}

.wc-csf-invoices-table .invoice-actions .button {
    padding: 6px 10px !important;
    font-size: 11px !important;
    margin-right: 5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.wc-csf-invoices-table .invoice-actions .button .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.wc-csf-invoices-table .invoice-actions .button.loading {
    opacity: 0.7;
    pointer-events: none;
}

.wc-csf-invoices-table .wc-csf-no-download {
    color: var(--csf-gray-600);
    font-size: 12px;
    font-style: italic;
}

/* Status badges */
.wc-csf-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.wc-csf-status-active {
    background: #d4edda;
    color: #155724;
}

.wc-csf-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.wc-csf-invoices-note {
    background: #e8f4fd;
    border: 1px solid #b8daff;
    border-radius: 6px;
    padding: 12px 15px;
    margin-top: 20px;
}

.wc-csf-invoices-note p {
    margin: 0;
    color: #004085;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wc-csf-invoices-note .dashicons {
    color: var(--csf-primary);
}

/* Responsive table */
@media (max-width: 768px) {
    .wc-csf-invoices-table thead {
        display: none;
    }
    
    .wc-csf-invoices-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid var(--csf-gray-300);
        border-radius: 6px;
        overflow: hidden;
    }
    
    .wc-csf-invoices-table tbody tr.invoice-uuid-row {
        margin-top: -16px;
        border-top: none;
        border-radius: 0 0 6px 6px;
    }
    
    .wc-csf-invoices-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
        border-bottom: 1px solid var(--csf-gray-200);
    }
    
    .wc-csf-invoices-table tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--csf-gray-800);
        margin-right: 10px;
    }
    
    .wc-csf-invoices-table tbody td.invoice-actions {
        justify-content: flex-end;
    }
    
    .wc-csf-invoices-table tbody td.invoice-actions:before {
        display: none;
    }
    
    .wc-csf-invoices-table .invoice-uuid-row td {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .wc-csf-invoices-table .invoice-uuid-row td:before {
        display: none;
    }
}

/* ==========================================================================
   Cart Registration Section
   ========================================================================== */
.wc-csf-cart-register {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f4fd 100%);
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
}

.wc-csf-cart-register-header {
    text-align: center;
    margin-bottom: 25px;
}

.wc-csf-cart-register-header h3 {
    margin: 0 0 10px 0;
    color: #224eca;
    font-size: 22px;
}

.wc-csf-cart-register-header p {
    margin: 0;
    color: #6c757d;
}

.wc-csf-cart-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.wc-csf-cart-option {
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
}

.wc-csf-cart-option:hover {
    border-color: #224eca;
    box-shadow: 0 5px 20px rgba(34, 78, 202, 0.15);
    transform: translateY(-3px);
}

.wc-csf-option-icon {
    width: 60px;
    height: 60px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.wc-csf-option-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #224eca;
}

.wc-csf-cart-option h4 {
    margin: 0 0 10px 0;
    color: #343a40;
}

.wc-csf-cart-option p {
    margin: 0 0 15px 0;
    color: #6c757d;
    font-size: 14px;
}

/* Cart Register Form */
#csf-cart-register-form {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    margin-top: 20px;
}

#csf-cart-register-form h4 {
    margin: 0 0 20px 0;
    color: #224eca;
    text-align: center;
}

.wc-csf-upload-box {
    background: #f0f4ff;
    border: 2px dashed #224eca;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

.wc-csf-upload-box .wc-csf-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: #224eca;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
}

#csf-reg-file-name {
    display: block;
    margin-top: 10px;
    color: #28a745;
    font-weight: 500;
}

.wc-csf-or-divider {
    text-align: center;
    color: #6c757d;
    margin: 20px 0;
}

.wc-csf-manual-rfc {
    max-width: 400px;
    margin: 0 auto;
}

.wc-csf-rfc-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.wc-csf-rfc-input-wrapper input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 16px;
    font-family: monospace;
}

#csf-rfc-status.valid::after { content: "✓"; color: #28a745; }
#csf-rfc-status.invalid::after { content: "✗"; color: #dc3545; }

#csf-rfc-validation-msg { display: block; margin-top: 8px; font-size: 13px; }
#csf-rfc-validation-msg.success { color: #28a745; }
#csf-rfc-validation-msg.error { color: #dc3545; }

.wc-csf-form-row { margin-bottom: 15px; }
.wc-csf-form-row label { display: block; margin-bottom: 5px; font-weight: 500; }
.wc-csf-form-row input, .wc-csf-form-row select { width: 100%; padding: 10px 12px; border: 1px solid #dee2e6; border-radius: 4px; }
.wc-csf-form-row-half { display: inline-block; width: 48%; margin-right: 2%; }
.wc-csf-form-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }

#csf-reg-status { text-align: center; margin-top: 15px; }
#csf-reg-status .success { color: #28a745; }
#csf-reg-status .error { color: #dc3545; }

/* Cart Login Reminder */
.wc-csf-cart-login-reminder {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wc-csf-cart-login-reminder p { margin: 0; color: #856404; }
.wc-csf-cart-login-reminder a { color: #224eca; font-weight: 600; }

/* ==========================================================================
   Company Users Section
   ========================================================================== */
.wc-csf-usuarios-empresa h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #224eca;
}

.wc-csf-company-info {
    background: #e8f4fd;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 25px;
}

.wc-csf-company-info p { margin: 5px 0; }

.wc-csf-users-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.wc-csf-users-table th {
    background: #224eca;
    color: #fff;
    padding: 12px 15px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
}

.wc-csf-users-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
}

.wc-csf-users-table tbody tr:hover td { background: #f8f9fa; }

.wc-csf-admin-badge {
    background: #224eca;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    margin-left: 8px;
    text-transform: uppercase;
}

.csf-user-role-select {
    padding: 5px 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.wc-csf-na { color: #aaa; }

/* Invite Section */
.wc-csf-invite-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.wc-csf-invite-section h4 {
    margin: 0 0 15px 0;
    color: #224eca;
}

.wc-csf-invite-fields {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.wc-csf-invite-fields input,
.wc-csf-invite-fields select {
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.wc-csf-invite-fields input[type="email"] { flex: 1; min-width: 200px; }
.wc-csf-invite-fields input[type="text"] { width: 120px; }
.wc-csf-invite-fields select { width: 150px; }

#csf-invite-status { display: block; margin-top: 10px; }
#csf-invite-status .success { color: #28a745; }
#csf-invite-status .error { color: #dc3545; }

@media (max-width: 768px) {
    .wc-csf-cart-options { grid-template-columns: 1fr; }
    .wc-csf-form-row-half { width: 100%; margin-right: 0; }
    .wc-csf-invite-fields { flex-direction: column; }
    .wc-csf-invite-fields input, .wc-csf-invite-fields select { width: 100%; }
}

/* ==========================================================================
   Checkout Auth Section
   ========================================================================== */
.wc-csf-checkout-auth {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f4fd 100%);
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
}

.wc-csf-checkout-auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.wc-csf-checkout-auth-header h3 {
    margin: 0;
    color: #224eca;
    font-size: 22px;
}

.wc-csf-checkout-auth-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.wc-csf-auth-option {
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 25px;
    transition: all 0.3s;
}

.wc-csf-auth-option:hover {
    border-color: #224eca;
    box-shadow: 0 5px 20px rgba(34, 78, 202, 0.1);
}

.wc-csf-auth-option-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.wc-csf-auth-option-header .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #224eca;
}

.wc-csf-auth-option-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.wc-csf-auth-option > p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
}

.wc-csf-auth-guest {
    background: #f8f9fa;
    border-style: dashed;
}

/* Login Form */
.wc-csf-login-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.wc-csf-login-form .form-row {
    margin-bottom: 15px;
}

.wc-csf-login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.wc-csf-login-form input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.wc-csf-lost-password {
    margin-left: 15px;
    font-size: 13px;
}

#csf-login-status,
#csf-checkout-register-status {
    margin-top: 15px;
}

#csf-login-status .success,
#csf-checkout-register-status .success {
    color: #28a745;
}

#csf-login-status .error,
#csf-checkout-register-status .error {
    color: #dc3545;
}

/* Register Form */
.wc-csf-register-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.wc-csf-upload-section {
    background: #f0f4ff;
    border: 2px dashed #224eca;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    margin-bottom: 20px;
}

.wc-csf-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #224eca;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.wc-csf-upload-btn:hover {
    background: #1a3da8;
}

#csf-checkout-file-name {
    display: block;
    margin-top: 10px;
    color: #28a745;
    font-weight: 500;
}

#csf-checkout-processing {
    margin-top: 15px;
    color: #224eca;
}

.wc-csf-divider {
    text-align: center;
    color: #999;
    font-size: 13px;
    margin: 20px 0;
}

#csf-checkout-rfc-msg {
    display: block;
    margin-top: 5px;
    font-size: 13px;
}

#csf-checkout-rfc-msg .success { color: #28a745; }
#csf-checkout-rfc-msg .error { color: #dc3545; }

.csf-checkout-step .form-row {
    margin-bottom: 15px;
}

.csf-checkout-step label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.csf-checkout-step input,
.csf-checkout-step select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.csf-checkout-step .form-row-first,
.csf-checkout-step .form-row-last {
    width: 48%;
    display: inline-block;
}

.csf-checkout-step .form-row-first {
    margin-right: 2%;
}

@media (max-width: 768px) {
    .wc-csf-checkout-auth-options {
        grid-template-columns: 1fr;
    }
    
    .csf-checkout-step .form-row-first,
    .csf-checkout-step .form-row-last {
        width: 100%;
        display: block;
        margin-right: 0;
    }
}
