/* Diamond Náutica Checkout - CSS Complementar */

/* Estilização adicional para garantir compatibilidade */
.diamond-checkout-form .woocommerce-input-wrapper {
    position: relative;
}

.diamond-checkout-form .select2-container {
    width: 100% !important;
}

.diamond-checkout-form .select2-selection {
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 0.375rem 0.5rem !important;
    min-height: 3.125rem !important;
}

.diamond-checkout-form .select2-selection:focus {
    border-color: #2a5298 !important;
}

/* Loading states */
.diamond-checkout-loading {
    position: relative;
}

.diamond-checkout-loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1000;
}

.diamond-checkout-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #2a5298;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1001;
}

/* Mensagens de erro e sucesso */
.woocommerce .woocommerce-error,
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid;
}

.woocommerce .woocommerce-error {
    background: #fdf2f2;
    border-left-color: #e74c3c;
    color: #e74c3c;
}

.woocommerce .woocommerce-message {
    background: #f0fff4;
    border-left-color: #27ae60;
    color: #27ae60;
}

.woocommerce .woocommerce-info {
    background: #f0f8ff;
    border-left-color: #2a5298;
    color: #2a5298;
}

/* Personalização do checkout steps */
.diamond-step.active {
    border-left: 4px solid #2a5298;
}

.diamond-step.completed .diamond-step-number {
    background: #27ae60;
    color: white;
}

.diamond-step.completed .diamond-step-number::before {
    content: "✓";
}

/* Animações suaves */
.diamond-checkout-container * {
    box-sizing: border-box;
}

.diamond-checkout-form input:valid {
    border-color: #27ae60;
}

.diamond-checkout-form input:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
}

/* Melhorias para acessibilidade */
.diamond-checkout-form input:focus,
.diamond-checkout-form select:focus,
.diamond-checkout-form textarea:focus {
    outline: 2px solid #2a5298;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .diamond-checkout-header,
    .diamond-step-number {
        color: black !important;
        background: white !important;
    }
}
