/**
 * Lockout Modal Styles - Elegant French Design
 * Version: 20.1.0
 */

/* Modal Container & Overlay */
.chroudakais-lockout-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
    padding: 20px; /* Add padding to ensure modal doesn't touch screen edges */
}

.chroudakais-lockout-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.chroudakais-lockout-container {
    position: relative;
    z-index: 1;
    max-width: 420px; /* Reduced from 520px */
    width: 90%;
    max-height: 85vh; /* Ensure it doesn't exceed viewport height */
    overflow-y: auto; /* Allow scrolling if needed */
    animation: slideUp 0.4s ease-out;
}

.chroudakais-lockout-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px; /* Slightly smaller radius */
    padding: 2rem 1.75rem; /* Reduced padding */
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

/* Glass morphism effect */
.chroudakais-lockout-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    pointer-events: none;
}

/* Content positioning */
.chroudakais-lockout-content > * {
    position: relative;
    z-index: 1;
}

/* Lock Icon - Smaller */
.chroudakais-lockout-icon {
    width: 60px; /* Reduced from 80px */
    height: 60px;
    margin: 0 auto 1.5rem; /* Reduced margin */
    position: relative;
}

.lock-icon {
    width: 100%;
    height: 100%;
    color: #fff;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    animation: lockPulse 2s ease-in-out infinite;
}

/* Pulse Rings - Smaller */
.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px; /* Reduced from 80px */
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    animation: pulseRing 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

.pulse-ring.delay {
    animation-delay: 0.5s;
}

/* Typography - Smaller text */
.chroudakais-lockout-title {
    font-size: 1.4rem; /* Reduced from 1.75rem */
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin: 0 0 1rem; /* Reduced margin */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.chroudakais-lockout-message {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px; /* Smaller radius */
    padding: 1rem; /* Reduced padding */
    margin-bottom: 1.5rem; /* Reduced margin */
}

.chroudakais-lockout-message p {
    color: #fff;
    font-size: 0.9rem; /* Reduced from 1rem */
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

.attempts-count {
    font-weight: 600;
    color: #ffd700;
}

/* Timer Section - Smaller */
.chroudakais-lockout-timer {
    margin-bottom: 1.5rem; /* Reduced margin */
}

.timer-container {
    text-align: center;
}

.timer-circle {
    width: 90px; /* Reduced from 120px */
    height: 90px;
    margin: 0 auto 0.75rem; /* Reduced margin */
    position: relative;
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 6; /* Reduced from 8 */
}

.timer-circle-progress {
    fill: none;
    stroke: #fff;
    stroke-width: 6; /* Reduced from 8 */
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.5rem; /* Reduced from 2rem */
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.timer-separator {
    animation: blink 1s infinite;
}

.timer-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem; /* Reduced from 0.875rem */
    margin: 0;
    font-weight: 500;
}

/* Info Card - Compressed */
.chroudakais-lockout-info {
    margin-bottom: 1.5rem; /* Reduced margin */
}

.info-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px; /* Smaller radius */
    padding: 1rem; /* Reduced padding */
    display: flex;
    gap: 0.75rem; /* Reduced gap */
}

.info-icon {
    width: 20px; /* Reduced from 24px */
    height: 20px;
    color: #ffd700;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-text {
    flex: 1;
}

.info-title {
    color: #ffd700;
    font-weight: 600;
    margin: 0 0 0.5rem; /* Reduced margin */
    font-size: 0.9rem; /* Reduced from 1rem */
}

.info-text ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.info-text li {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem; /* Reduced from 0.875rem */
    line-height: 1.4;
    padding-left: 1rem; /* Reduced padding */
    position: relative;
    margin-bottom: 0.35rem; /* Reduced margin */
}

.info-text li:last-child {
    margin-bottom: 0;
}

.info-text li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4ade80;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Close Button - Smaller */
.chroudakais-lockout-close {
    display: block;
    width: 100%;
    padding: 0.75rem 1.5rem; /* Reduced padding */
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px; /* Smaller radius */
    color: #fff;
    font-size: 0.9rem; /* Reduced from 1rem */
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chroudakais-lockout-close:not(:disabled) {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.chroudakais-lockout-close:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -8px rgba(0, 0, 0, 0.2);
}

.chroudakais-lockout-close:not(:disabled) .close-countdown {
    display: none;
}

.chroudakais-lockout-close:disabled .close-text {
    opacity: 0.7;
}

.close-countdown {
    opacity: 0.9;
    font-size: 0.8rem; /* Reduced from 0.875rem */
    margin-left: 0.5rem;
}

/* Success State */
.chroudakais-lockout-modal.unlocked .chroudakais-lockout-content {
    background: linear-gradient(135deg, #667eea 0%, #4ade80 100%);
}

.chroudakais-lockout-modal.unlocked .lock-icon {
    animation: unlock 0.5s ease-out forwards;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes pulseRing {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

@keyframes unlock {
    0% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* Responsive Design */
@media (max-width: 640px) {
    .chroudakais-lockout-modal {
        padding: 10px; /* Less padding on mobile */
    }
    
    .chroudakais-lockout-container {
        width: 95%;
        max-width: 100%;
        max-height: 90vh; /* More height on mobile */
    }
    
    .chroudakais-lockout-content {
        padding: 1.5rem 1.25rem; /* Further reduced padding */
        border-radius: 12px;
    }
    
    .chroudakais-lockout-title {
        font-size: 1.25rem; /* Smaller on mobile */
    }
    
    .chroudakais-lockout-icon {
        width: 50px; /* Even smaller on mobile */
        height: 50px;
        margin: 0 auto 1rem;
    }
    
    .pulse-ring {
        width: 50px;
        height: 50px;
    }
    
    .timer-circle {
        width: 80px; /* Smaller timer on mobile */
        height: 80px;
    }
    
    .timer-display {
        font-size: 1.25rem; /* Smaller timer text */
    }
    
    .chroudakais-lockout-message {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .chroudakais-lockout-message p {
        font-size: 0.85rem; /* Smaller text */
    }
    
    .info-card {
        padding: 0.75rem;
        flex-direction: column; /* Stack icon and text on mobile */
        gap: 0.5rem;
    }
    
    .info-title {
        font-size: 0.85rem;
    }
    
    .info-text li {
        font-size: 0.75rem; /* Even smaller list items */
        padding-left: 0.85rem;
        margin-bottom: 0.25rem;
    }
    
    .chroudakais-lockout-close {
        padding: 0.65rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .timer-label {
        font-size: 0.75rem;
    }
    
    /* Hide less important elements on very small screens */
    @media (max-height: 600px) {
        .pulse-ring {
            display: none; /* Hide animation on very small screens */
        }
        
        .chroudakais-lockout-info {
            margin-bottom: 1rem;
        }
        
        .timer-container {
            margin-bottom: 0.5rem;
        }
    }
}

/* Tablets and small laptops */
@media (min-width: 641px) and (max-width: 1024px) {
    .chroudakais-lockout-container {
        max-width: 380px;
    }
    
    .chroudakais-lockout-content {
        padding: 2rem 1.5rem;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .chroudakais-lockout-modal {
        padding: 5px;
    }
    
    .chroudakais-lockout-container {
        max-height: 95vh;
    }
    
    .chroudakais-lockout-content {
        padding: 1rem;
    }
    
    .chroudakais-lockout-icon {
        display: none; /* Hide icon in landscape to save space */
    }
    
    .chroudakais-lockout-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .chroudakais-lockout-message {
        margin-bottom: 0.75rem;
        padding: 0.5rem;
    }
    
    .timer-circle {
        width: 60px;
        height: 60px;
    }
    
    .timer-display {
        font-size: 1rem;
    }
    
    .chroudakais-lockout-info {
        display: none; /* Hide info section in landscape to save space */
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .chroudakais-lockout-overlay {
        background: rgba(0, 0, 0, 0.85);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .chroudakais-lockout-content {
        border: 2px solid #fff;
    }
    
    .timer-circle-progress {
        stroke-width: 10;
    }
    
    .chroudakais-lockout-close {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .chroudakais-lockout-modal,
    .chroudakais-lockout-container,
    .lock-icon,
    .pulse-ring,
    .timer-separator {
        animation: none;
    }
    
    .chroudakais-lockout-close:not(:disabled):hover {
        transform: none;
    }
}