/**
 * Access Restriction Popup Styles
 */

.access-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.access-popup-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 100%;
    position: relative;
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
    font-family: var(--wd-text-font, inherit);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.access-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f7f7f7;
    border: 1px solid #e8e8e8;
    color: #333;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--btn-accented-brd-radius, 5px);
    font-size: 20px;
    line-height: 1;
}

.access-popup-close:hover {
    color: #000;
    background: #efefef;
    border-color: #ddd;
}

.access-popup-content {
    padding: 50px 40px 40px;
    text-align: center;
}

.access-popup-icon {
    margin-bottom: 30px;
    color: var(--wd-primary-color, #83b735);
}

.access-popup-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
    line-height: 1.2;
}

.access-popup-message {
    color: #555;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.access-popup-message > p:first-child {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.access-popup-legal {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.access-popup-legal p {
    margin: 0 0 10px;
    font-size: 14px;
}

.access-popup-legal p:last-child {
    margin-bottom: 0;
}

.access-popup-legal strong {
    color: #2c3e50;
}

.access-popup-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.access-popup-btn {
    padding: 12px 30px;
    border-radius: var(--btn-accented-brd-radius, 5px);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-block;
    border: none;
    line-height: 1.5;
    text-transform: none; /* Remove uppercase */
    letter-spacing: normal;
    font-family: var(--wd-text-font, inherit);
}

.access-popup-btn-primary {
    background: var(--wd-primary-color, #83b735);
    color: var(--wd-primary-color-text, #fff);
    box-shadow: 0 0 0 0 transparent;
    border: 2px solid var(--wd-primary-color, #83b735);
}

.access-popup-btn-primary:hover {
    background: var(--wd-primary-color-hover, #72a02f);
    border-color: var(--wd-primary-color-hover, #72a02f);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(131, 183, 53, 0.3);
    color: var(--wd-primary-color-text, #fff);
}

.access-popup-btn-secondary {
    background: transparent;
    color: var(--wd-text-color, #333);
    border: 2px solid var(--wd-border-color, #e8e8e8);
}

.access-popup-btn-secondary:hover {
    background: var(--wd-border-color, #f7f7f7);
    border-color: var(--wd-text-color, #333);
    color: var(--wd-text-color, #333);
}

.access-popup-footer {
    font-size: 13px;
    color: #999;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.access-popup-footer p {
    margin: 0;
}

/* Mobile styles */
@media (max-width: 576px) {
    .access-popup-content {
        padding: 40px 25px 30px;
    }
    
    .access-popup-title {
        font-size: 24px;
    }
    
    .access-popup-message {
        font-size: 15px;
    }
    
    .access-popup-actions {
        flex-direction: column;
    }
    
    .access-popup-btn {
        width: 100%;
        text-align: center;
    }
}

/* Content hiding for restricted pages */
body.access-restricted-page:not(.search-bot) .site-content,
body.access-restricted-page:not(.search-bot) .main-page-wrapper,
body.access-restricted-page:not(.search-bot) .products,
body.access-restricted-page:not(.search-bot) .woocommerce-products-header,
body.access-restricted-page:not(.search-bot) .page-content,
body.access-restricted-page:not(.search-bot) .entry-content {
    visibility: hidden;
    position: relative;
}

/* Keep header and navigation visible */
body.access-restricted-page .site-header,
body.access-restricted-page .main-nav,
body.access-restricted-page .breadcrumbs,
body.access-restricted-page .footer,
body.access-restricted-page .site-footer {
    visibility: visible;
}

/* Ensure popup is always visible */
body.access-restricted-page .access-popup-overlay {
    visibility: visible !important;
}

/* Dark theme support */
body.theme-dark .access-popup-container {
    background: #1a1a1a;
    color: #fff;
}

body.theme-dark .access-popup-title {
    color: #fff;
}

body.theme-dark .access-popup-message {
    color: #ccc;
}

body.theme-dark .access-popup-legal {
    background: #2a2a2a;
    color: #ddd;
}

body.theme-dark .access-popup-btn-secondary {
    background: #333;
    color: #fff;
}

body.theme-dark .access-popup-btn-secondary:hover {
    background: #444;
}