.wp-omeda-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    backdrop-filter: blur(4px);
}

.wp-omeda-modal-content {
    position: relative;
    background-color: #fff;
    margin: 15vh auto;
    padding: 2.5rem;
    max-width: 550px;
    width: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* Added specific selector to override any other display styles */
#wp-omeda-paywall-modal.wp-omeda-modal.active,
body.wp-omeda-paywall-active #wp-omeda-paywall-modal.wp-omeda-modal {
    display: block !important;
    position: fixed !important;
    z-index: 999999 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

body.wp-omeda-paywall-active {
    overflow: hidden !important;
}

body.wp-omeda-intensity-high .wp-omeda-restricted-container {
    max-height: none !important;
    overflow: auto !important;
}

.wp-omeda-paywall-message {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.6;
}

.wp-omeda-restricted-excerpt:after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 250px !important;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1)) !important;
    pointer-events: none !important;
}

/* Restriction notice styling */
.wp-omeda-restriction-notice {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-left: 4px solid #0d6efd;
    color: #495057;
    font-weight: bold;
}

/* Enhanced modal styling */
.wp-omeda-modal.active {
    animation: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.wp-omeda-modal-content {
    position: relative !important;
    z-index: 1000000 !important;
    background: #fff !important;
    padding: 2rem !important;
    border-radius: 8px !important;
    max-width: 500px !important;
    margin: 10vh auto !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

.wp-omeda-paywall-message {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

/* High intensity specific styles */
body.wp-omeda-intensity-high .entry-content {
    position: relative;
}

body.wp-omeda-intensity-high .wp-omeda-paywall-active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 99998;
}

/* Article Counter Styles - Made more prominent */
.wp-omeda-article-counter-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #fff;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-size: 0.9rem;
    color: #333;
    z-index: 99999;
    border: 1px solid #dee2e6;
    font-weight: bold;
}

/* Restricted Content Styles - Low Intensity - Improved masking */
.wp-omeda-restricted-content {
    position: relative !important;
    max-height: 800px !important;
    overflow: hidden !important;
    margin-bottom: 5rem !important;
    -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 100%) !important;
    mask-image: linear-gradient(to bottom, black 30%, transparent 100%) !important;
}

/* Additional selector for browsers that might not support mask-image */
.wp-omeda-restricted-content:after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent, #fff);
    pointer-events: none;
}

/* Restricted Content Styles - Medium Intensity - Better excerpt styling */
.wp-omeda-restricted-excerpt {
    position: relative !important;
    max-height: 600px !important;
    overflow: hidden !important;
    margin-bottom: 2rem !important;
}

.wp-omeda-restricted-excerpt:after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 250px !important;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1)) !important;
    pointer-events: none !important;
}

.wp-omeda-hidden-content {
    display: none;
    visibility: hidden;
}

/* Ensure modal buttons look good */
.wp-omeda-modal-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.wp-omeda-modal-actions .button {
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-block;
}

.wp-omeda-modal-actions .button-primary {
    background-color: #0d6efd;
    color: #fff;
    border: 1px solid #0d6efd;
}

.wp-omeda-modal-actions .button-primary:hover {
    background-color: #0b5ed7;
}

.wp-omeda-modal-actions .button {
    background-color: #f8f9fa;
    color: #212529;
    border: 1px solid #dee2e6;
}

.wp-omeda-modal-actions .button:hover {
    background-color: #e9ecef;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .wp-omeda-modal-content {
        margin: 5vh 1rem;
        padding: 1.5rem;
    }

    .wp-omeda-article-counter-wrapper {
        bottom: 10px;
        right: 10px;
        font-size: 0.8rem;
        padding: 8px 15px;
    }

    .wp-omeda-modal-actions {
        flex-direction: column;
    }
}

#wp-omeda-login-prompt .wp-omeda-modal-content {
    max-width: 500px;
    text-align: center;
    padding: 2.5rem;
}

#wp-omeda-login-prompt h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.benefits-list {
    text-align: left;
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
}

.benefits-list h3 {
    color: #0d6efd;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.benefits-list ul {
    margin: 0;
    padding-left: 1.5rem;
}

.benefits-list li {
    margin: 0.75rem 0;
    color: #495057;
}

/* Animation for paywall modal */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.wp-omeda-modal {
    animation: fadeIn 0.3s ease-out;
}

.wp-omeda-modal-content {
    animation: slideUp 0.4s ease-out;
}

/* Ensure hidden content stays hidden without causing conflicts */
.wp-omeda-hidden-content,
script[type="text/template"],
script[data-requires-auth="true"] {
    display: none !important;
}

/* High contrast warning for expired articles */
.wp-omeda-article-counter-wrapper.expired {
    background-color: #dc3545;
    color: white;
    border-color: #b02a37;
}

/* Article Counter Base Styles */
.wp-omeda-article-counter-wrapper {
    position: fixed;
    z-index: 99999;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    max-height: fit-content;
    max-width: fit-content;
}

/* Position variations */
.wp-omeda-article-counter-wrapper.position-bottom-right {
    bottom: 20px;
    right: 20px;
}

.wp-omeda-article-counter-wrapper.position-bottom-left {
    bottom: 20px;
    left: 20px;
}

.wp-omeda-article-counter-wrapper.position-top-right {
    top: 20px;
    right: 20px;
}

.wp-omeda-article-counter-wrapper.position-top-left {
    top: 20px;
    left: 20px;
}

/* Style variations */
.wp-omeda-article-counter-wrapper.style-default {
    background-color: #fff;
    font-weight: bold;
}

.wp-omeda-article-counter-wrapper.style-minimal {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 8px 15px;
    font-size: 0.8rem;
}

.wp-omeda-article-counter-wrapper.style-prominent {
    background-color: #0d6efd;
    color: white;
    font-weight: bold;
    box-shadow: 0 3px 12px rgba(13, 110, 253, 0.3);
}

.wp-omeda-article-counter-wrapper.style-subtle {
    background-color: rgba(0, 0, 0, 0.05);
    color: #555;
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: none;
}

/* Expired states for all styles */
.wp-omeda-article-counter-wrapper.expired.style-default {
    background-color: #dc3545;
    color: white;
    border-color: #b02a37;
}

.wp-omeda-article-counter-wrapper.expired.style-minimal {
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
}

.wp-omeda-article-counter-wrapper.expired.style-prominent {
    background-color: #dc3545;
    box-shadow: 0 3px 12px rgba(220, 53, 69, 0.3);
}

.wp-omeda-article-counter-wrapper.expired.style-subtle {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .wp-omeda-article-counter-wrapper {
        padding: 8px 15px;
        font-size: 0.8rem;
    }

    .wp-omeda-article-counter-wrapper.position-bottom-right,
    .wp-omeda-article-counter-wrapper.position-bottom-left {
        bottom: 10px;
    }

    .wp-omeda-article-counter-wrapper.position-top-right,
    .wp-omeda-article-counter-wrapper.position-top-left {
        top: 10px;
    }

    .wp-omeda-article-counter-wrapper.position-bottom-right,
    .wp-omeda-article-counter-wrapper.position-top-right {
        right: 10px;
    }

    .wp-omeda-article-counter-wrapper.position-bottom-left,
    .wp-omeda-article-counter-wrapper.position-top-left {
        left: 10px;
    }
}