/* OTP Registration Custom Styles */

#mco-otp-registration-wrapper {
    margin-top: 15px;
}

#mco-otp-registration-wrapper .mco-notice {
    background-color: rgba(133, 173, 116, 0.1);
    color: #5b874b;
    padding: 12px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

#mco-otp-registration-wrapper .mco-message {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
}

#mco-otp-registration-wrapper .mco-error {
    color: #e2401c;
    background-color: rgba(226, 64, 28, 0.05);
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
    width: 100%;
}

#mco-otp-registration-wrapper .mco-success {
    color: #5b874b;
    background-color: rgba(133, 173, 116, 0.1);
    padding: 8px 12px;
    border-radius: 4px;
    display: inline-block;
    width: 100%;
}

#mco-otp-registration-wrapper button {
    width: 100%;
    transition: all 0.3s ease;
}

#mco-otp-registration-wrapper button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Fix WooCommerce / Woodmart Password Eye Icon */
#mco-otp-registration-wrapper .password-input {
    display: block !important;
    position: relative !important;
    width: 100% !important;
}

#mco-otp-registration-wrapper .password-input input {
    width: 100% !important;
    padding-inline-end: 50px !important; /* Ensure text doesn't overlap the eye icon */
}

#mco-otp-registration-wrapper .show-password-input {
    position: absolute !important;
    top: 50% !important;
    right: 15px !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 10 !important;
}

#mco-otp-registration-wrapper .show-password-input:before {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Custom Promo Popup Styles - Blue & White Theme */
.wd-promo-popup {
    background: #ffffff !important; /* Clean white background */
    color: #1d3557 !important; /* Deep blue text */
    border-radius: 16px !important;
    border: none !important;
    padding: 50px 35px !important;
    text-align: center;
    max-width: 480px !important;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 15px 40px rgba(29, 53, 87, 0.15) !important;
}

/* Background Blur Overlay */
.mfp-bg {
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    background-color: rgba(29, 53, 87, 0.45) !important; /* Soft dark-blue tinted overlay */
}

/* Hide the default Woodmart elements inside the promo popup if they exist */
.wd-promo-popup .wd-popup-inner > *:not(.mco-promo-popup-content) {
    display: none !important;
}

.mco-promo-popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: mcoFadeInUp 0.6s ease;
}

.mco-promo-badge {
    background-color: #e0f2fe; /* Light blue accent */
    color: #0369a1; /* Deep sky blue */
    font-size: 12px;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 50px;
    margin-bottom: 22px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: inline-block;
}

.mco-promo-title {
    font-size: 26px !important;
    font-weight: 800 !important;
    color: #1d3557 !important; /* Deep slate blue */
    margin-bottom: 12px !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: inherit;
    line-height: 1.25 !important;
}

.mco-promo-subtitle {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 25px;
    max-width: 340px;
    line-height: 1.5;
}

/* Interactive Code Box */
.mco-promo-code-wrapper {
    position: relative;
    margin-bottom: 25px;
}

.mco-promo-code-box {
    background-color: #f0f9ff;
    border: 1px dashed #bae6fd;
    border-radius: 10px;
    padding: 14px 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mco-promo-code-box:hover {
    background-color: #e0f2fe;
    border-color: #7dd3fc;
    transform: scale(1.02);
}

.mco-promo-code-label {
    font-size: 11px;
    color: #0369a1;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.mco-promo-code {
    font-size: 18px;
    font-weight: 800;
    color: #0284c7;
    letter-spacing: 1.5px;
}

.mco-copy-icon {
    display: flex;
    align-items: center;
    color: #0284c7;
    margin-left: 5px;
}

/* Tooltip */
.mco-copied-tooltip {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #64748b;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mco-copied-tooltip.copied {
    color: #16a34a;
    font-weight: 600;
}

.mco-promo-cta {
    background-color: #1d3557 !important; /* Match dark blue from logo/branding */
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.2px !important;
    padding: 14px 28px !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    display: inline-block !important;
    width: auto !important;
    max-width: 340px !important;
    white-space: nowrap !important;
    box-shadow: 0 4px 15px rgba(29, 53, 87, 0.2) !important;
    transition: all 0.3s ease !important;
}

.mco-promo-cta:hover {
    background-color: #2b4f80 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 53, 87, 0.35) !important;
}

.mco-promo-footer {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 22px;
    margin-bottom: 0;
}

/* Close Button Position & Background override */
.mfp-content {
    position: relative !important;
}

/* 1. Using modern CSS :has() selector for direct layout targeting */
.mfp-content:has(.wd-promo-popup) {
    max-width: 480px !important;
    margin: 0 auto !important;
    position: relative !important;
}

.mfp-content:has(.wd-promo-popup) .wd-popup-close {
    position: absolute !important;
    top: -12px !important;
    right: -12px !important;
    background: #1d3557 !important; /* Brand Blue */
    color: #ffffff !important; /* White Icon */
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 15px rgba(29, 53, 87, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10000 !important;
    cursor: pointer !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.25s ease !important;
}

.mfp-content:has(.wd-promo-popup) .wd-popup-close:hover {
    background: #2b4f80 !important;
    transform: scale(1.05);
    color: #ffffff !important;
}

.mfp-content:has(.wd-promo-popup) .wd-popup-close a {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    text-decoration: none !important;
    border: none !important;
    color: inherit !important;
}

.mfp-content:has(.wd-promo-popup) .wd-popup-close a:before {
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

/* 2. Using JS Class fallback for older browser support */
.mfp-content.mco-promo-active {
    max-width: 480px !important;
    margin: 0 auto !important;
    position: relative !important;
}

.mfp-content.mco-promo-active .wd-popup-close {
    position: absolute !important;
    top: -12px !important;
    right: -12px !important;
    background: #1d3557 !important; /* Brand Blue */
    color: #ffffff !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 15px rgba(29, 53, 87, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10000 !important;
    cursor: pointer !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.25s ease !important;
}

.mfp-content.mco-promo-active .wd-popup-close:hover {
    background: #2b4f80 !important;
    transform: scale(1.05);
    color: #ffffff !important;
}

.mfp-content.mco-promo-active .wd-popup-close a {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    text-decoration: none !important;
    border: none !important;
    color: inherit !important;
}

.mfp-content.mco-promo-active .wd-popup-close a:before {
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

/* Simple fade-in-up animation */
@keyframes mcoFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Store Locator Page Styles */
.celics-store-locator-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
    font-family: inherit;
    color: #1d3557;
}

.celics-store-header {
    text-align: center;
    margin-bottom: 50px;
}

.celics-store-header h1 {
    font-size: 36px;
    font-weight: 800;
    color: #1d3557;
    margin-bottom: 15px;
}

.celics-store-header p {
    font-size: 16px;
    color: #4a5568;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.celics-store-layout {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    align-items: stretch;
}

.celics-store-info-card {
    flex: 1;
    min-width: 300px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(29, 53, 87, 0.08);
    padding: 40px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.celics-store-status {
    background-color: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    align-self: flex-start;
    margin-bottom: 15px;
}

.celics-store-name {
    font-size: 28px;
    font-weight: 800;
    color: #1d3557;
    margin-bottom: 5px;
}

.celics-store-tagline {
    font-size: 14px;
    color: #0284c7;
    font-weight: 600;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.celics-store-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 40px;
}

.celics-detail-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.celics-detail-item .celics-icon {
    color: #0284c7;
    background: #f0f9ff;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.celics-detail-item .celics-text strong {
    font-size: 14px;
    color: #1d3557;
    display: block;
    margin-bottom: 4px;
}

.celics-detail-item .celics-text p {
    font-size: 14px;
    color: #4a5568;
    margin: 0;
    line-height: 1.5;
}

.celics-directions-btn {
    background-color: #1d3557;
    color: #ffffff !important;
    text-align: center;
    padding: 14px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none !important;
    display: block;
    width: 100%;
    margin-top: auto;
    box-shadow: 0 4px 15px rgba(29, 53, 87, 0.2);
    transition: all 0.3s ease;
}

.celics-directions-btn:hover {
    background-color: #2b4f80;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 53, 87, 0.35);
}

.celics-store-map-card {
    flex: 1.5;
    min-width: 300px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(29, 53, 87, 0.08);
    border: 1px solid #e2e8f0;
}

.celics-store-map-card iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 450px;
}

@media (max-width: 768px) {
    .celics-store-layout {
        flex-direction: column;
    }
    .celics-store-map-card iframe {
        min-height: 350px;
    }
}
