/**
 * Elementor Frontend Styles
 * CSS for Elementor widgets on frontend
 *
 * @package SectionLockBlurPro
 * @since 1.0.0
 */

/* ==========================================================================
   Lock Overlay Styles
   ========================================================================== */

.slcbp-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.slcbp-lock-content {
    text-align: center;
    padding: 30px;
    max-width: 400px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #e1e5e9;
}

.slcbp-lock-icon {
    font-size: 48px;
    color: #666;
    margin-bottom: 20px;
}

.slcbp-lock-icon .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
}

/* Font Awesome icon fallbacks */
.fas, .fa-solid {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", sans-serif;
    font-weight: 900;
}

.far, .fa-regular {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", sans-serif;
    font-weight: 400;
}

.fab, .fa-brands {
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands", sans-serif;
    font-weight: 400;
}

/* Specific icon fallbacks */
.fa-crown:before {
    content: "\f521";
}

.fa-crop:before {
    content: "\f125";
}

.fa-unlock:before {
    content: "\f09c";
}

.fa-lock:before {
    content: "\f023";
}

.fa-spinner:before {
    content: "\f110";
}

.fa-sign-in-alt:before {
    content: "\f2f6";
}

.slcbp-lock-message {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.6;
}

.slcbp-unlock-button {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.slcbp-unlock-button:hover {
    background: #135e96;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

.slcbp-unlock-button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Locked Element Styles
   ========================================================================== */

.slcbp-locked-element {
    position: relative;
    overflow: hidden;
}

.slcbp-locked-element.slcbp-blurred {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}

.slcbp-locked-element.slcbp-teaser {
    max-height: 200px;
    overflow: hidden;
}

.slcbp-locked-element.slcbp-teaser::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.9));
    pointer-events: none;
}

/* ==========================================================================
   Blur Image Widget
   ========================================================================== */

.slcbp-blur-image {
    position: relative;
    display: inline-block;
}

.slcbp-blur-image.slcbp-blurred .slcbp-image-container {
    position: relative;
}

.slcbp-blur-image .slcbp-blurred-img {
    filter: blur(8px);
    transition: filter 0.3s ease;
}

.slcbp-blur-image .slcbp-blur-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

/* Unlock message styles are now controlled by Elementor dynamic CSS */

.slcbp-image-caption {
    margin-top: 10px;
    color: #333;
    font-size: 14px;
    text-align: center;
}

.slcbp-blur-image.slcbp-blurred {
    filter: none !important;
}

/* ==========================================================================
   Member Only Widget
   ========================================================================== */

.slcbp-member-only {
    position: relative;
}

.slcbp-member-only.slcbp-restricted {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
}

.slcbp-member-content {
    transition: all 0.3s ease;
}

.slcbp-member-only.slcbp-restricted .slcbp-member-content {
    opacity: 0.3;
    filter: blur(3px);
    pointer-events: none;
    user-select: none;
}

.slcbp-restriction-notice {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 10;
}

.slcbp-restriction-notice h4 {
    margin: 0 0 10px;
    color: #333;
    font-size: 18px;
}

.slcbp-restriction-notice p {
    margin: 0 0 15px;
    color: #666;
    font-size: 14px;
}

/* ==========================================================================
   Modal Styles
   ========================================================================== */

.slcbp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.slcbp-modal-overlay.slcbp-show {
    opacity: 1;
    visibility: visible;
}

.slcbp-modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.slcbp-modal-overlay.slcbp-show .slcbp-modal {
    transform: scale(1);
}

.slcbp-modal-header {
    padding: 20px 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slcbp-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.slcbp-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slcbp-modal-close:hover {
    color: #333;
}

.slcbp-modal-body {
    padding: 20px;
}

.slcbp-modal-body p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

.slcbp-modal-footer {
    padding: 0 20px 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.slcbp-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.slcbp-btn-primary {
    background: #2271b1;
    color: #fff;
}

.slcbp-btn-primary:hover {
    background: #135e96;
}

.slcbp-btn-secondary {
    background: #f1f1f1;
    color: #666;
}

.slcbp-btn-secondary:hover {
    background: #ddd;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .slcbp-lock-content {
        padding: 20px;
        margin: 15px;
    }
    
    .slcbp-lock-icon {
        font-size: 36px;
        margin-bottom: 15px;
    }
    
    .slcbp-lock-icon .dashicons {
        font-size: 36px;
        width: 36px;
        height: 36px;
    }
    
    .slcbp-lock-message {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .slcbp-unlock-button {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .slcbp-modal {
        width: 95%;
        margin: 20px;
    }
    
    .slcbp-modal-footer {
        flex-direction: column;
    }
    
    .slcbp-btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* ==========================================================================
   Dark Theme Support
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .slcbp-lock-overlay {
        background: rgba(0, 0, 0, 0.9);
    }
    
    .slcbp-lock-content {
        background: #1e1e1e;
        border-color: #333;
        color: #fff;
    }
    
    .slcbp-lock-message {
        color: #ccc;
    }
    
    .slcbp-modal {
        background: #1e1e1e;
        color: #fff;
    }
    
    .slcbp-modal-header h3 {
        color: #fff;
    }
    
    .slcbp-modal-body p {
        color: #ccc;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.slcbp-unlock-button:focus,
.slcbp-btn:focus,
.slcbp-modal-close:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .slcbp-unlock-button,
    .slcbp-modal,
    .slcbp-modal-overlay,
    .slcbp-locked-element,
    .slcbp-blurred-img {
        transition: none;
    }
}