/* D40 Paywall Styles */
.d40-paywall-container {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin: 30px auto;
    padding: 40px 30px;
    max-width: 560px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333333;
    display: inline-block;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -80px;
    width: 100%;
}

.d40-paywall-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

/* Logo and Site Title */
.d40-paywall-logo img {
    max-height: 60px;
    width: auto;
}

.d40-paywall-site-title h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #333333;
    letter-spacing: -0.5px;
}

/* Text Content */
.d40-paywall-text {
    text-align: center;
}

.d40-paywall-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
}

.d40-paywall-subtitle {
    margin: 0;
    font-size: 16px;
    color: #666666;
    font-weight: 400;
}

/* Button Container */
.d40-paywall-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
}

/* Button Styles */
.d40-paywall-button {
    display: inline-block;
    padding: 10px 30px;
    text-decoration: none;
    border-radius: 0;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    cursor: pointer;
    line-height: 1.2;
}

a.d40-paywall-button-primary {
    background-color: var(--e-global-color-primary);
    color: #ffffff;
    border-color: var(--e-global-color-primary);
}

a.d40-paywall-button-primary:hover {
    background-color: var(--e-global-color-1e47607);
    color: var(--e-global-color-primary);
    text-decoration: none;
}

a.d40-paywall-button-secondary {
    background-color: var(--e-global-color-1e47607);
    color: var( --e-global-color-1944097 );
    border-color: transparent;
    padding: 10px 30px;
}

a.d40-paywall-button-secondary:hover {
    color: #fff;
    background-color: var(--e-global-color-primary);
}

/* Responsive Design */
@media (min-width: 480px) {
    .d40-paywall-buttons {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 20px;
        max-width: none;
    }
    
    .d40-paywall-button {
        flex: 0 0 auto;
        min-width: 140px;
    }
    
    .d40-paywall-button-secondary {
        flex: 0 0 auto;
        min-width: auto;
    }
}

/* Single button layout */
.d40-paywall-buttons:has(.d40-paywall-button:only-child) {
    align-items: center;
}

.d40-paywall-buttons:has(.d40-paywall-button:only-child) .d40-paywall-button {
    max-width: 250px;
}

/* Two button layout optimization */
@media (max-width: 479px) {
    .d40-paywall-buttons {
        gap: 12px;
    }
    
    .d40-paywall-button-primary {
        order: 1;
    }
    
    .d40-paywall-button-secondary {
        order: 2;
        font-size: 13px;
    }
}

/* Light mode override (if needed) */
@media (prefers-color-scheme: light) {
    .d40-paywall-container.d40-light-mode {
        background: #ffffff;
        border-color: #e0e0e0;
        color: #333333;
    }
    
    .d40-paywall-container.d40-light-mode .d40-paywall-site-title h2 {
        color: #333333;
    }
    
    .d40-paywall-container.d40-light-mode .d40-paywall-title {
        color: #1a1a1a;
    }
    
    .d40-paywall-container.d40-light-mode .d40-paywall-subtitle {
        color: #666666;
    }
}

/* Animation for paywall appearance */
.d40-paywall-container {
    animation: d40PaywallFadeIn 0.5s ease-out;
}

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

/* Custom styling hooks for advanced users */
.d40-paywall-container.d40-custom-style {
    position: relative;
}

/* Logo styling */
.d40-paywall-logo img {
    max-height: 60px;
    width: auto;
}

.d40-paywall-custom-logo {
    max-height: 60px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.d40-paywall-logo .custom-logo-link {
    display: inline-block;
}

/* Accessibility improvements */
.d40-paywall-button:focus {
    outline: 2px solid var(--e-global-color-primary);
    outline-offset: 2px;
}

.d40-paywall-button-secondary:focus {
    outline: 2px solid var(--e-global-color-primary);
    outline-offset: 2px;
}

/* Share  Button Styles updated*/
.d40-share-button-wrapper {
    position: relative;
    display: inline-block;
}

a.d40-share-button {
    background: var(--e-global-color-primary);
    color: #ffffff;
    border: none;
    border-radius: 0;
    padding: 8px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

a.d40-share-button:hover {
    background: var(--e-global-color-primary);
    color: #ffffff;
    text-decoration: none;
}

.d40-share-button .elementor-button-content-wrapper {
    display: flex;
    align-items: center;
}

.d40-share-button .elementor-button-icon {
    margin-right: 8px;
    display: flex;
    align-items: center;
}

/*updated from 16px*/
.d40-share-button .e-font-icon-svg {
    width: 26px;
    height: 26px; 
    fill: currentColor;
}

.d40-share-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: transparent;
    border-radius: 0;
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
    pointer-events: none;
    border-style: solid;
    border-width: 1px 1px 1px 1px;
    border-color: transparent;
}

.d40-share-button-wrapper:hover .d40-share-dropdown,
.d40-share-dropdown:hover {
    opacity: 1;
    visibility: visible;
    transform: translate(-1px, 0px);
    pointer-events: auto;
}

button.d40-share-option {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background-color: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #333333;
    transition: background-color 0.2s ease;
}

.d40-share-option:hover {
    background-color: var(--e-global-color-primary);
    color: #ffffff;
}

/* Share/* Notifications */
.d40-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var( --e-global-color-primary );
    color: white;
    padding: 15px 20px;
    border-radius: 0px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.d40-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.d40-notification.error {
    background: #dc3545;
}

/* Share Notification Box new style*/    
.d40-share-notification {
    margin-top: 30px;
    padding: 20px;
    background: var(--e-global-color-1e47607);
    border: 1px solid #dee2e6;
    border-radius: 0px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 470px;
  margin: 100px auto;
}

.d40-share-notification-content {
    text-align: center;
}

.d40-share-notification-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--e-global-color-primary);
}

.d40-share-notification-text {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: var(--e-global-color-primary);
    line-height: 1.5;
}
/* Share Notification Button */
.d40-share-notification-button-wrapper {
    margin-top: 15px;
}

a.d40-share-notification-button{
    display: inline-block;
    padding: 10px 30px;
    text-decoration: none;
    border-radius: 0;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    color: white;
    background: var(--e-global-color-primary);
    border: 1px solid var(--e-global-color-primary);
}

a.d40-share-notification-button:hover{
    text-decoration: none;
}

a.d40-share-notification-button:hover{
    color: var(--e-global-color-primary);
    background: var(--e-global-color-1e47607);
    border: 1px solid var(--e-global-color-primary);
}

/* Print styles */
@media print {
    .d40-paywall-container {
        border: 1px solid #000;
        box-shadow: none;
        background: #fff !important;
        color: #000 !important;
    }
    
    .d40-paywall-button {
        border: 1px solid #000 !important;
        background: #fff !important;
        color: #000 !important;
    }
    
    .d40-share-button-wrapper {
        display: none !important;
    }
}
