/* Shared Styles and Common Utilities */

/* Global body styles */
html, body {
    max-width: 100vw;
    padding-bottom: 60px;
    background-color: #000;
    
    color: #fff;
    
    
}

/* Utility classes */
.hidden {
    display: none;
}

.invisible {
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Common fade in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Opt-out notification styles */
.opt-out-notification {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.95), rgba(76, 175, 80, 0.85));
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    font-size: 14px;
    font-weight: 500;
    max-width: 350px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.5s ease-out;
    line-height: 1.4;
}

.opt-out-notification.show {
    display: block;
}

.opt-out-notification .notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.opt-out-notification .notification-icon {
    font-size: 18px;
    color: #e8f5e8;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-weight: bold;
    line-height: 1;
}

.opt-out-notification .notification-text {
    flex: 1;
}

.opt-out-notification .notification-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 16px;
    padding: 2px;
    margin-left: 8px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.opt-out-notification .notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Opt-out duration modal styles */
.opt-out-duration-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10001;
    animation: modalFadeIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.opt-out-duration-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.opt-out-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

.opt-out-modal-content {
    background: linear-gradient(145deg, #2a2a2a, #323232);
    color: #fff;
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    max-width: 500px;
    width: 90%;
    margin: 20px auto;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: contentSlideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 40px);
}

/* Custom scrollbar for the modal */
.opt-out-modal-content::-webkit-scrollbar {
    width: 10px;
}

.opt-out-modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin: 4px 0;
}

.opt-out-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(145deg, rgba(76, 175, 80, 0.4), rgba(76, 175, 80, 0.6));
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: all 0.3s ease;
    min-height: 40px;
}

.opt-out-modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(145deg, rgba(76, 175, 80, 0.6), rgba(76, 175, 80, 0.8));
    transform: scale(1.05);
}

.opt-out-modal-content::-webkit-scrollbar-corner {
    background: transparent;
}

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

/* Modal Header - Matching existing premium modal header */
.opt-out-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, #1e1e1e 0%, #252525 100%);
    color: #fff;
    border-radius: 12px 12px 0 0;
    outline: none;
}

.opt-out-modal-header:focus-visible {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

.opt-out-modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    text-shadow: none;
    letter-spacing: normal;
    border-bottom: none;
    padding-bottom: 0;
    padding-right: 0;
}

.opt-out-modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.opt-out-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.opt-out-modal-body {
    padding: 24px 25px;
}

.opt-out-description {
    margin: 0 0 24px 0;
    color: #d6d6d6;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
}

.duration-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.duration-option {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.duration-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(76, 175, 80, 0.1), transparent);
    transition: left 0.5s;
}

.duration-option:hover::before {
    left: 100%;
}

.duration-option:hover {
    background: linear-gradient(145deg, rgba(76, 175, 80, 0.08), rgba(76, 175, 80, 0.04));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.15);
}

.duration-option.active {
    background: linear-gradient(145deg, rgba(76, 175, 80, 0.12), rgba(76, 175, 80, 0.06));
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.25);
    transform: translateY(-1px);
}

.duration-radio {
    margin-right: 16px;
}

.duration-radio input[type="radio"] {
    display: none;
}

.duration-radio label {
    position: relative;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.05);
}

.duration-radio input[type="radio"]:checked + label {
    border-color: #4CAF50;
    background: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.duration-radio input[type="radio"]:checked + label::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.duration-content {
    flex: 1;
    z-index: 1;
    position: relative;
}

.duration-title {
    font-weight: 600;
    font-size: 16px;
    color: #fff;
    margin-bottom: 4px;
}

.duration-description {
    font-size: 14px;
    color: #d6d6d6;
    line-height: 1.4;
}



/* Mobile responsive adjustments */
@media (max-width: 767px) {
    /* Mobile-specific modal adjustments */
    .opt-out-modal-content {
        max-height: 85vh;
        max-height: calc(85 * var(--vh, 1vh));
        width: 95%;
        margin: 20px auto;
    }

    /* Ensure proper scrolling on mobile */
    .opt-out-duration-modal {
        -webkit-overflow-scrolling: touch;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .opt-out-modal-header {
        padding: 20px 20px 12px;
    }

    .opt-out-modal-header h3 {
        font-size: 20px;
    }

    .opt-out-modal-body {
        padding: 20px;
    }


    .duration-option {
        padding: 14px 16px;
    }

    .duration-title {
        font-size: 15px;
    }

    .duration-description {
        font-size: 13px;
    }

    .opt-out-description {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .opt-out-modal-content {
        width: 100%;
        margin: 10px;
        max-height: 95vh;
        max-height: calc(95 * var(--vh, 1vh));
    }

    .opt-out-modal-header {
        padding: 18px 18px 10px;
    }

    .opt-out-modal-header h3 {
        font-size: 18px;
    }

    .opt-out-modal-body {
        padding: 18px;
    }


    .duration-option {
        padding: 12px 14px;
    }

    .duration-title {
        font-size: 14px;
    }

    .duration-description {
        font-size: 12px;
    }

    .opt-out-description {
        font-size: 14px;
    }

}

/* Notification mobile adjustments */
@media (max-width: 768px) {
    .opt-out-notification {
        top: 15px;
        right: 15px;
        left: 15px;
        max-width: none;
        padding: 14px 16px;
        font-size: 13px;
    }

    .opt-out-notification .notification-content {
        gap: 10px;
    }

    .opt-out-notification .notification-icon {
        font-size: 16px;
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .opt-out-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        padding: 12px 14px;
        font-size: 12px;
    }

    .opt-out-notification .notification-icon {
        font-size: 14px;
        width: 16px;
        height: 16px;
    }
}

/* Global scrollbar styling */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: content-box;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Firefox scrollbar styling */
html,
body {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

/* Universal rounded scrollbar class for modals and scrollable containers */
.rounded-scrollbar::-webkit-scrollbar {
    width: 10px;
}

.rounded-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin: 4px 0;
}

.rounded-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(145deg, rgba(76, 175, 80, 0.4), rgba(76, 175, 80, 0.6));
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: all 0.3s ease;
    min-height: 40px;
}

.rounded-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(145deg, rgba(76, 175, 80, 0.6), rgba(76, 175, 80, 0.8));
    transform: scale(1.05);
}

.rounded-scrollbar::-webkit-scrollbar-corner {
    background: transparent;
}

/* Common button styles that can be shared across components */
.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.btn-primary,
.btn-secondary,
.btn-danger {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.btn-primary::before,
.btn-secondary::before,
.btn-danger::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before,
.btn-secondary:hover::before,
.btn-danger:hover::before {
    left: 100%;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-primary:active,
.btn-secondary:active,
.btn-danger:active {
    transform: translateY(0);
    transition: all 0.1s ease;
}

/* Secondary Button Override */
.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Danger Button Override */
.btn-danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.25);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

/* Common tooltip styles */
.tooltip-base {
    position: absolute;
    background: linear-gradient(145deg, #333, #2a2a2a);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 9999;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: tooltipFade 0.3s ease;
}

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

/* Footer Disclaimer Styling - Theme Aware */
.dsm-footer-disclaimer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg,
        rgba(76, 175, 80, 0.1),
        rgba(76, 175, 80, 0.05)
    );
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(76, 175, 80, 0.3);
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.dsm-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3px 12px;
    text-align: center;
    border-radius: 8px 8px 0 0;
    border-bottom: none;
}

.dsm-footer-disclaimer p {
    color: #ddd;
    font-size: 11px;
    margin: 0;
    line-height: 1.4;
}

.dsm-footer-disclaimer strong {
    color: #4CAF50;
}

/* Responsive adjustments */
@media (min-width: 1901px) {
    .dsm-footer-disclaimer {
        left: 250px; /* Account for sidebar on desktop */
    }
}

@media (max-width: 1900px) {
    .dsm-footer-disclaimer {
        left: 0; /* Full width on mobile */
    }
    
    .dsm-footer-content {
        padding: 6px 15px;
    }
    
    .dsm-footer-disclaimer p {
        font-size: 10px;
    }
    
    body {
        
    }
}

@media (max-width: 480px) {
    .dsm-footer-content {
        padding: 5px 10px;
    }
    
    .dsm-footer-disclaimer p {
        font-size: 9px;
        line-height: 1.3;
    }
    
    body {
        padding-bottom: 30px;
        padding-top: 20px;
    }
}



.dsm-footer-links {
    display: inline;
    margin-left: 10px;
    font-size: 0.9em;
}

.dsm-footer-link {
    text-decoration: none;
    transition: color 0.3s ease;
    color: #666;
}

.dsm-footer-link:hover {
    color: #333;
    text-decoration: underline;
}



/* Admin form styles */
.admin-form-inline {
    display: inline;
}

.admin-input-full {
    width: 100%;
}

.admin-textarea-full {
    width: 100%;
}

.admin-shortcode-input {
    width: 100%;
}

/* Premium Manager inline styles */
.premium-status-active {
    color: green;
}

.premium-status-expired {
    color: orange;
}

.premium-status-inactive {
    color: red;
}

/* Match welcome screen colors for footer when user is not logged in - applies to all pages */
.dsm-user-not-logged-in .dsm-footer-disclaimer {
    background: linear-gradient(135deg, 
        rgba(33, 150, 243, 0.1), 
        rgba(33, 150, 243, 0.05)
    );
    border-top: 1px solid rgba(33, 150, 243, 0.3);
    box-shadow: 0 -2px 10px rgba(33, 150, 243, 0.2);
}

.dsm-user-not-logged-in .dsm-footer-disclaimer strong {
    color: #2196F3;
}



/* Common responsive visibility classes */
.mobile-only {
    display: none !important;
}

@media screen and (max-width: 1900px) {
    .mobile-only {
        display: block !important;
    }
    
    .desktop-only {
        display: none !important;
    }
}