/**
 * Frontend Styles for Section Lock & Blur Pro
 * 
 * @package SectionLockBlurPro
 * @since 1.0.0
 */

/* ==========================================================================
   Base Lock Styles
   ========================================================================== */

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

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

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

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

.slcbp-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    backdrop-filter: blur(2px);
    transition: all 0.3s ease;
}

.slcbp-lock-message {
    text-align: center;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    margin: 20px;
    border: 1px solid #e0e0e0;
}

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

.slcbp-lock-icon:before {
    content: "\1F512"; /* Lock emoji as fallback */
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

/* 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 p {
    margin: 15px 0;
    color: #555;
    line-height: 1.6;
    font-size: 16px;
}

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

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

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

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

.slcbp-unlock-button {
    background: #2271b1;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

.slcbp-unlock-button:hover {
    background: #1e5a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(34, 113, 177, 0.4);
}

.slcbp-unlock-button:active {
    transform: translateY(0);
}

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

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

.slcbp-member-content {
    position: relative;
    border: 2px solid #b3d9ff;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
}

.slcbp-member-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #333;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.slcbp-member-badge i {
    color: #ff6b35;
    font-size: 14px;
}

.slcbp-guest-content {
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    position: relative;
}

.slcbp-content-teaser {
    position: relative;
    margin-bottom: 20px;
}

.slcbp-teaser-overlay {
    background: linear-gradient(180deg, transparent 0%, rgba(255,248,220,0.8) 40%, rgba(255,248,220,0.95) 100%);
    padding: 30px 0 15px;
    margin-top: -30px;
    text-align: center;
    border-radius: 0 0 12px 12px;
}

.slcbp-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.slcbp-cta-button:hover {
    transform: translateY(-3px);
    color: white;
    text-decoration: none;
}

.slcbp-cta-button:active {
    transform: translateY(-1px);
}

.slcbp-cta-section {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px dashed #fdcb6e;
}

/* ==========================================================================
   Login Forms
   ========================================================================== */

.slcbp-login-form {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

.slcbp-login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.slcbp-login-form input[type="text"],
.slcbp-login-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

.slcbp-login-form input[type="text"]:focus,
.slcbp-login-form input[type="password"]:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}

.slcbp-login-form input[type="submit"] {
    background: #2271b1;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.slcbp-login-form input[type="submit"]:hover {
    background: #1e5a8a;
}

.slcbp-login-section h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    text-align: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* ==========================================================================
   Paragraph Lock Styles
   ========================================================================== */

.slcbp-paragraph-lock {
    position: relative;
    padding: 15px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin: 15px 0;
}

.slcbp-paragraph-lock.locked {
    filter: blur(3px);
    pointer-events: none;
}

.slcbp-paragraph-counter {
    position: absolute;
    top: -12px;
    left: 15px;
    background: #6c757d;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.slcbp-paragraph-unlock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

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

@media (max-width: 768px) {
    .slcbp-lock-message {
        margin: 10px;
        padding: 20px;
        max-width: none;
    }
    
    .slcbp-lock-icon {
        font-size: 36px;
    }
    
    .slcbp-member-content,
    .slcbp-guest-content {
        margin: 15px 0;
        padding: 20px;
    }
    
    .slcbp-unlock-button,
    .slcbp-cta-button {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .slcbp-teaser-overlay {
        padding: 20px 0 10px;
        margin-top: -20px;
    }
}

@media (max-width: 480px) {
    .slcbp-lock-message {
        padding: 15px;
    }
    
    .slcbp-lock-icon {
        font-size: 32px;
        margin-bottom: 10px;
    }
    
    .slcbp-member-badge {
        font-size: 11px;
        padding: 4px 12px;
    }
    
    .slcbp-unlock-button,
    .slcbp-cta-button {
        padding: 10px 16px;
        font-size: 13px;
        gap: 6px;
    }
}

/* ==========================================================================
   Animation Effects
   ========================================================================== */

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

@keyframes slcbp-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.slcbp-lock-overlay {
    animation: slcbp-fadeIn 0.3s ease-out;
}

.slcbp-member-badge {
    animation: slcbp-pulse 2s infinite;
}

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

.slcbp-lock-message:focus-within {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    .slcbp-lock-overlay {
        background: rgba(255, 255, 255, 0.95);
    }
    
    .slcbp-lock-message {
        border: 2px solid #000;
    }
    
    .slcbp-blurred {
        filter: blur(8px) contrast(1.5);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .slcbp-blurred,
    .slcbp-unlock-button,
    .slcbp-cta-button,
    .slcbp-lock-overlay {
        transition: none;
    }
    
    .slcbp-member-badge {
        animation: none;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .slcbp-lock-overlay,
    .slcbp-unlock-button,
    .slcbp-cta-button {
        display: none !important;
    }
    
    .slcbp-blurred {
        filter: none !important;
    }
    
    .slcbp-locked-content {
        border: 2px dashed #000;
    }
    
    .slcbp-locked-content:after {
        content: " [Content locked - login required]";
        font-style: italic;
        color: #666;
    }
}