/**
 * Sample Request Popup Styles
 * Clean, focused design inspired by modern UX patterns
 */

/* Popup Backdrop */
.sample-popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    backdrop-filter: blur(2px);
}

/* Main Popup Container */
.sample-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    max-width: 90vw;
    max-height: 90vh;
    width: 500px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Popup Content */
.sample-popup-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Popup Header */
.sample-popup-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 30px 10px 30px;
    background: #ffffff;
    position: relative;
}

/* Logo */
.sample-popup-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sample-popup-logo-img {
    height: 50px;
    width: auto;
    max-width: 200px;
}

/* Close Button */
.sample-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #666666;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.sample-popup-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Popup Body */
.sample-popup-body {
    padding: 0 30px 30px 30px;
    text-align: center;
}

/* Main Question */
.sample-popup-question {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333333;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

/* Sample Image */
.sample-popup-sample {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.sample-popup-sample-img {
    max-width: 100%;
    height: auto;
    max-height: 100px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
}

.sample-popup-sample-text {
    font-size: 0.9rem;
    color: #666666;
    margin: 0;
    font-style: italic;
}

/* Action Buttons */
.sample-popup-actions {
    margin-top: 30px;
}

.sample-popup-cta {
    display: block;
    width: 100%;
    background: #007dc3;
    color: #ffffff;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-bottom: 15px;
}

.sample-popup-cta:hover {
    background: #0163b1;
}

.sample-popup-dismiss {
    color: #058205;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.sample-popup-dismiss:hover {
    color: #0163b1;
    text-decoration: none;
}

/* Form Popup Styles (for second step) */
.sample-popup-form-container {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
    margin-top: 20px;
}

.sample-popup-form-container iframe {
    display: block;
    width: 100%;
    border: none;
    background: #ffffff;
}

/* Description (for form popup) */
.sample-popup-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #333333;
    margin: 0 0 20px 0;
    text-align: center;
}

/* Body scroll prevention */
body.popup-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sample-popup {
        width: 95vw;
        max-height: 95vh;
        margin: 10px;
    }
    
    .sample-popup-header {
        padding: 15px 20px 10px 20px;
    }
    
    .sample-popup-body {
        padding: 0 20px 20px 20px;
    }
    
    .sample-popup-question {
        font-size: 1.5rem;
    }
    
    .sample-popup-sample {
        padding: 12px;
        margin: 15px 0;
    }
    
    .sample-popup-sample-img {
        max-height: 80px;
    }
    
    .sample-popup-cta {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .sample-popup {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        top: 0;
        left: 0;
        transform: none;
    }
    
    .sample-popup-header {
        padding: 12px 15px 8px 15px;
    }
    
    .sample-popup-body {
        padding: 0 15px 15px 15px;
    }
    
    .sample-popup-question {
        font-size: 1.3rem;
    }
    
    .sample-popup-sample {
        padding: 10px;
        margin: 12px 0;
    }
    
    .sample-popup-sample-img {
        max-height: 60px;
    }
    
    .sample-popup-cta {
        padding: 10px 15px;
        font-size: 0.95rem;
    }
    
    .sample-popup-close {
        font-size: 1.3rem;
        width: 25px;
        height: 25px;
    }
}

/* Animation for smooth appearance */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.sample-popup {
    animation: popupFadeIn 0.3s ease-out;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .sample-popup {
        border: 2px solid #000000;
    }
    
    .sample-popup-cta {
        border: 2px solid #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .sample-popup {
        animation: none;
    }
    
    .sample-popup-close {
        transition: none;
    }
    
    .sample-popup-cta {
        transition: none;
    }
}

/* Focus management for accessibility */
.sample-popup:focus-within {
    outline: 2px solid #007dc3;
    outline-offset: 2px;
}

/* Loading state for iframe */
.sample-popup-form-container::before {
    content: "Loading form...";
    display: block;
    text-align: center;
    padding: 20px;
    color: #666666;
    font-style: italic;
}

/* Hide loading text when iframe is loaded (controlled by JavaScript) */
.sample-popup-form-container.iframe-loaded::before {
    display: none;
}