/**
 * ePasuyo Facebook Like Popup Styles
 */

/* Overlay */
.epasuyo-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.epasuyo-popup-overlay.show {
    opacity: 1;
}

/* Container */
.epasuyo-popup-container {
    position: relative;
    max-width: 420px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease-in-out;
}

.epasuyo-popup-overlay.show .epasuyo-popup-container {
    transform: translateY(0);
}

/* Content */
.epasuyo-popup-content {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 24px;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
}

/* Close Button */
.epasuyo-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.epasuyo-popup-close:hover,
.epasuyo-popup-close:focus {
    background: #f5f5f5;
    color: #333;
    outline: none;
}

/* Header */
.epasuyo-popup-header {
    margin-bottom: 16px;
    padding-right: 40px; /* Space for close button */
}

.epasuyo-popup-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #1c1e21;
    line-height: 1.3;
}

/* Body */
.epasuyo-popup-body {
    margin-bottom: 20px;
}

.epasuyo-popup-body p {
    margin: 0 0 16px 0;
    color: #65676b;
    font-size: 15px;
    line-height: 1.4;
}

/* Facebook Widget */
.epasuyo-popup-facebook-widget {
    margin-bottom: 16px;
    text-align: center;
}

.epasuyo-facebook-fallback {
    text-align: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.epasuyo-facebook-fallback p {
    margin: 0 0 12px 0;
    color: #495057;
    font-weight: 500;
}

.epasuyo-fb-link {
    display: inline-block;
    padding: 8px 16px;
    background: #1877f2;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.epasuyo-fb-link:hover {
    background: #166fe5;
    text-decoration: none;
}

/* Footer */
.epasuyo-popup-footer {
    text-align: center;
}

/* CTA Button */
.epasuyo-popup-cta {
    display: inline-block;
    background: #1877f2;
    color: #ffffff !important;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    min-width: 200px;
    box-shadow: 0 2px 4px rgba(24, 119, 242, 0.2);
}

.epasuyo-popup-cta:hover,
.epasuyo-popup-cta:focus {
    background: #166fe5;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(24, 119, 242, 0.3);
    outline: none;
}

.epasuyo-popup-cta:active {
    transform: translateY(0);
}

/* Facebook SDK Styling */
.fb-like {
    margin: 8px 0;
}

/* Responsive Design */
@media (max-width: 480px) {
    .epasuyo-popup-container {
        width: 95%;
        margin: 10px;
    }
    
    .epasuyo-popup-content {
        padding: 20px;
        border-radius: 12px;
    }
    
    .epasuyo-popup-header h3 {
        font-size: 20px;
        padding-right: 35px;
    }
    
    .epasuyo-popup-body p {
        font-size: 14px;
    }
    
    .epasuyo-popup-cta {
        padding: 10px 20px;
        font-size: 15px;
        min-width: 180px;
    }
    
    .epasuyo-popup-close {
        top: 12px;
        right: 12px;
        width: 28px;
        height: 28px;
        font-size: 20px;
    }
}

@media (max-width: 320px) {
    .epasuyo-popup-content {
        padding: 16px;
    }
    
    .epasuyo-popup-cta {
        width: 100%;
        min-width: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .epasuyo-popup-content {
        border: 2px solid #000;
    }
    
    .epasuyo-popup-close {
        border: 1px solid #666;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .epasuyo-popup-overlay,
    .epasuyo-popup-container,
    .epasuyo-popup-close,
    .epasuyo-popup-cta {
        transition: none;
    }
}

/* Focus styles for accessibility */
.epasuyo-popup-cta:focus,
.epasuyo-popup-close:focus {
    outline: 2px solid #1877f2;
    outline-offset: 2px;
}

/* Loading state for Facebook widget */
.epasuyo-popup-facebook-widget:empty::before {
    content: "Loading Facebook widget...";
    display: block;
    text-align: center;
    color: #65676b;
    font-style: italic;
    padding: 20px;
}