/**
 * TD Quick Checkout - Frontend Styles
 */

/* ===========================
   Email Capture Modal
   =========================== */

.tdqc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    animation: tdqc-fade-in 0.3s ease-out;
}

@keyframes tdqc-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.tdqc-modal {
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: tdqc-slide-up 0.3s ease-out;
    overflow: hidden;
}

@keyframes tdqc-slide-up {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.tdqc-modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tdqc-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.tdqc-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.tdqc-modal-close:hover {
    color: #333;
}

.tdqc-modal-body {
    padding: 30px;
}

.tdqc-modal-body p {
    margin: 0 0 20px;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

/* ===========================
   Form Styles
   =========================== */

.tdqc-form-group {
    margin-bottom: 20px;
}

.tdqc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.tdqc-form-group input[type="email"],
.tdqc-form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.tdqc-form-group input:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.tdqc-error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
    margin: 15px 0;
}

/* ===========================
   Buttons
   =========================== */

.tdqc-btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: #2196f3;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-align: center;
}

.tdqc-btn-primary:hover:not(:disabled) {
    background: #1976d2;
}

.tdqc-btn-primary:active:not(:disabled) {
    transform: scale(0.98);
}

.tdqc-btn-primary:disabled {
    background: #bbb;
    cursor: not-allowed;
}

/* ===========================
   Loading Overlay
   =========================== */

.tdqc-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    animation: tdqc-fade-in 0.3s ease-out;
}

.tdqc-loading-content {
    text-align: center;
    color: #fff;
}

.tdqc-loading-content p {
    margin: 20px 0 0;
    font-size: 18px;
    font-weight: 500;
}

.tdqc-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tdqc-spin 0.8s linear infinite;
}

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

/* ===========================
   Quick Checkout Banner
   =========================== */

.tdqc-quick-checkout-banner {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 6px;
    padding: 15px 20px;
    margin: 20px 0;
    text-align: center;
    font-size: 16px;
    color: #1565c0;
}

.tdqc-quick-checkout-banner strong {
    font-weight: 600;
}

/* ===========================
   Success/Error Notices
   =========================== */

.tdqc-success-notice {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 6px;
    font-size: 16px;
}

.tdqc-error-notice {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 6px;
    font-size: 16px;
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 600px) {
    .tdqc-modal {
        width: 95%;
        margin: 20px;
    }

    .tdqc-modal-header {
        padding: 20px;
    }

    .tdqc-modal-header h2 {
        font-size: 20px;
    }

    .tdqc-modal-body {
        padding: 20px;
    }

    .tdqc-spinner {
        width: 50px;
        height: 50px;
    }

    .tdqc-loading-content p {
        font-size: 16px;
    }
}

/* ===========================
   Utility Classes
   =========================== */

.tdqc-hidden {
    display: none !important;
}

.tdqc-text-center {
    text-align: center;
}

.tdqc-mt-20 {
    margin-top: 20px;
}

.tdqc-mb-20 {
    margin-bottom: 20px;
}
