/**
 * Bullhorn API - Popup Styles
 * Apply Job popup overlay with modern design
 */

/* Overlay */
.bh-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.bh-popup-overlay.active {
    display: flex;
}

body.bh-popup-open {
    overflow: hidden;
}

/* Container */
.bh-popup-container {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 640px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: bhPopupSlideIn 0.3s ease;
    border-top: 4px solid var(--brand-primary, #7C3AED);
}

@keyframes bhPopupSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close button */
.bh-popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.bh-popup-close:hover {
    color: #374151;
    background: #f3f4f6;
}

/* Content */
.bh-popup-content {
    min-height: 100px;
}

/* Job details inside popup */
.bh-popup-job-title {
    font-size: 1.4em;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 16px 0;
    padding-right: 30px;
    line-height: 1.3;
}

.bh-popup-job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.bh-popup-meta-item {
    font-size: 0.9em;
    color: #6b7280;
}

.bh-popup-meta-item strong {
    color: #374151;
    font-weight: 600;
}

/* Form area */
.bh-popup-form-area {
    margin-top: 20px;
}

/* Loading state */
.bh-popup-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 1em;
}

.bh-popup-loading::before {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--brand-primary, #7C3AED);
    border-radius: 50%;
    animation: bhPopupSpin 0.6s linear infinite;
    margin: 0 auto 12px;
}

@keyframes bhPopupSpin {
    to { transform: rotate(360deg); }
}

/* Error state */
.bh-popup-error {
    text-align: center;
    padding: 30px 20px;
    color: #dc2626;
    font-size: 0.95em;
}

/* Responsive */
@media (max-width: 640px) {
    .bh-popup-container {
        width: 95%;
        padding: 24px 20px;
        margin: 10px;
        max-height: 90vh;
    }

    .bh-popup-job-title {
        font-size: 1.2em;
    }

    .bh-popup-job-meta {
        flex-direction: column;
        gap: 8px;
    }
}
