/**
 * Growup Business - Frontend Checkout Styles
 *
 * Ultra-modern, creative popup modal and input validation styles for WooCommerce & CartFlows.
 *
 * @package GrowupBusiness
 */

/* =========================================
   Phone Validation Feedback
   ========================================= */
.growup-phone-feedback {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    margin-top: 6px;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.growup-phone-error {
    color: #ef4444;
    background: #fef2f2;
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid #fee2e2;
}

.growup-phone-ok {
    color: #10b981;
    background: #ecfdf5;
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid #d1fae5;
    font-size: 13px;
}

.growup-phone-invalid input {
    border-color: #ef4444 !important;
    background-color: #fff8f8 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.growup-phone-valid input {
    border-color: #10b981 !important;
    background-color: #f6fdf9 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

/* =========================================
   Creative Modal Backdrop & Container
   ========================================= */
.growup-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.72) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999999 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 20px;
    box-sizing: border-box !important;
}

.growup-modal-overlay.growup-modal-active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* =========================================
   Modal Card
   ========================================= */
.growup-modal-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
    max-width: 480px;
    width: 100%;
    padding: 36px 30px 28px;
    text-align: center;
    position: relative;
    transform: scale(0.92) translateY(24px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.growup-modal-overlay.growup-modal-active .growup-modal-card {
    transform: scale(1) translateY(0);
}

/* Top Gradient Accent Bar */
.growup-modal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #f59e0b, #ef4444, #8b5cf6, #3b82f6);
}

/* Close Button (✕) */
.growup-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #64748b;
    transition: all 0.25s ease;
    outline: none;
}

.growup-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg) scale(1.08);
}

/* =========================================
   Animated Icon
   ========================================= */
.growup-modal-icon-wrap {
    width: 76px;
    height: 76px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    position: relative;
    box-shadow: 0 0 0 10px rgba(245, 158, 11, 0.18);
    animation: growupPulse 2.2s infinite ease-in-out;
}

@keyframes growupPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    70% {
        box-shadow: 0 0 0 18px rgba(245, 158, 11, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

/* =========================================
   Modal Content & Typography
   ========================================= */
.growup-modal-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.growup-modal-message-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 20px;
    margin: 18px 0 24px;
    color: #334155;
    font-size: 15px;
    line-height: 1.65;
    text-align: center;
    font-weight: 500;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
    white-space: pre-line;
}

/* =========================================
   Action Buttons
   ========================================= */
.growup-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.growup-btn-primary {
    background: linear-gradient(135deg, #4f46e5, #3730a3);
    color: #ffffff !important;
    border: none;
    border-radius: 14px;
    padding: 15px 22px;
    font-size: 15.5px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.28);
}

.growup-btn-primary:hover {
    background: linear-gradient(135deg, #4338ca, #312e81);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(79, 70, 229, 0.38);
    color: #ffffff !important;
}

.growup-btn-call {
    background: linear-gradient(135deg, #10b981, #047857);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.28);
}

.growup-btn-call:hover {
    background: linear-gradient(135deg, #059669, #065f46);
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.38);
}

.growup-btn-secondary {
    background: #f1f5f9;
    color: #475569 !important;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 13px 22px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.25s ease;
}

.growup-btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a !important;
    transform: translateY(-1px);
}

/* =========================================
   Mobile Optimization
   ========================================= */
@media (max-width: 480px) {
    .growup-modal-card {
        padding: 28px 20px 22px;
        border-radius: 20px;
    }
    .growup-modal-title {
        font-size: 19px;
    }
    .growup-modal-message-box {
        font-size: 14px;
        padding: 14px 16px;
    }
    .growup-modal-icon-wrap {
        width: 64px;
        height: 64px;
        font-size: 32px;
        margin-bottom: 16px;
    }
    .growup-btn-primary, .growup-btn-secondary {
        padding: 13px 18px;
        font-size: 14px;
        border-radius: 12px;
    }
}
