/* ========================================
   Calendly Popup Enhancements
   Makes close button more visible and adds UX improvements
   ======================================== */

/* Make Calendly overlay more visible */
.calendly-overlay {
    z-index: 10000 !important;
    background: rgba(0, 0, 0, 0.6) !important;
}

.calendly-popup {
    z-index: 10001 !important;
}

/* Enhance Calendly's built-in close button */
.calendly-close-overlay,
.calendly-popup-close {
    background: rgba(255, 255, 255, 0.98) !important;
    border-radius: 50% !important;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.calendly-close-overlay:hover,
.calendly-popup-close:hover {
    background: #ef4444 !important;
    color: white !important;
    transform: scale(1.1) !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4) !important;
}

/* Custom close button (backup if Calendly's is hidden) */
.calendly-custom-close {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    color: #374151;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInButton 0.5s ease 0.5s forwards;
}

@keyframes fadeInButton {
    to {
        opacity: 1;
    }
}

.calendly-custom-close:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* ESC key hint tooltip */
.calendly-esc-hint {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    z-index: 10002;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.5s ease;
    font-weight: 500;
}

.calendly-esc-hint kbd {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-weight: 600;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .calendly-custom-close {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .calendly-esc-hint {
        bottom: 16px;
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
}

/* Click outside to close hint */
.calendly-click-hint {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    z-index: 9999;
    pointer-events: none;
    animation: fadeOut 2s ease forwards;
}

@keyframes fadeOut {
    0% {
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}
