/* Gmodal — lightweight modal (no Bootstrap JS) for guest CV upload. */

.gmodal {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.65);
    z-index: 10000;
    display: none;
    align-items: center; justify-content: center;
    padding: 12px;
    animation: gmodal-fade 0.15s ease-out;
}
.gmodal.is-open { display: flex; }
.gmodal__dialog {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    width: 100%; max-width: 520px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    animation: gmodal-slide 0.2s ease-out;
    position: relative;
}
.gmodal__body { padding: 2rem 2rem 1.75rem; }
.gmodal__close {
    position: absolute; top: 14px; right: 14px;
    background: rgba(241, 245, 249, 0.8);
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 1.25rem; line-height: 1;
    cursor: pointer; color: #64748b;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.gmodal__close:hover { background: #e2e8f0; color: #0f172a; }
body.gmodal-open { overflow: hidden; }

/* Title + subtitle inside modal */
.gmodal .guest-upload__title {
    font-weight: 700 !important;
    font-size: 1.5rem !important;
    text-align: center !important;
    color: #0f172a !important;
    margin: 0 0 0.5rem !important;
    line-height: 1.3 !important;
    letter-spacing: normal !important;
    background: none !important;
    -webkit-text-fill-color: #0f172a;
}
.gmodal .guest-upload__subtitle {
    text-align: center !important;
    color: #64748b !important;
    font-size: 0.9rem !important;
    margin: 0 0 1.5rem !important;
}

/* Drag & drop zone */
.guest-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 2.5rem 1rem;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.guest-dropzone:hover,
.guest-dropzone:focus-visible {
    border-color: #2563eb;
    background: #eef2ff;
    outline: none;
}
.guest-dropzone.is-dragging {
    border-color: #2563eb;
    background: #dbeafe;
    border-style: solid;
    transform: scale(1.02);
}
.guest-dropzone__icon {
    font-size: 2.5rem;
    color: #2563eb;
    display: block;
    margin-bottom: 0.75rem;
}
.guest-dropzone__title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}
.guest-dropzone__subtitle {
    font-size: 0.875rem;
    color: #64748b;
}
.guest-dropzone__link {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 500;
}

/* Selected file pill */
.guest-fileinfo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}
.guest-fileinfo__icon { color: #10b981; font-size: 1.1rem; flex-shrink: 0; }
.guest-fileinfo__name {
    color: #064e3b;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.guest-fileinfo__clear {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-size: 0.82rem;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    flex-shrink: 0;
}
.guest-fileinfo__clear:hover { background: #f1f5f9; color: #0f172a; }

/* Email section */
.gmodal .guest-upload__email-section { margin-top: 1.5rem !important; }
.gmodal .guest-upload__email-label {
    display: block !important;
    font-weight: 500 !important;
    color: #334155 !important;
    font-size: 0.9rem !important;
    margin-bottom: 0.5rem !important;
}
.gmodal .guest-upload__email-input {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s !important;
}
.gmodal .guest-upload__email-input::placeholder { color: #94a3b8 !important; }
.gmodal .guest-upload__email-input:focus {
    outline: none;
    border-color: #2563eb !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* Legal microcopy */
.guest-upload__legal {
    margin: 0.75rem 0 1.25rem;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.5;
    text-align: center;
}
.guest-upload__legal a { color: #2563eb; text-decoration: underline; }

/* Submit button */
.guest-upload__submit {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.15s, opacity 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.guest-upload__submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}
.guest-upload__submit:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.75;
}
.guest-upload__submit i { font-size: 1.1rem; }

/* Status box (success / error after submit) */
.gmodal .guest-upload__status {
    text-align: center !important;
    margin-top: 0.75rem !important;
    font-size: 0.9rem !important;
}
.gmodal .guest-upload__status--error { color: #dc2626 !important; }
.gmodal .guest-upload__status--success {
    padding: 1.5rem 0 !important;
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b;
}
.gmodal .guest-upload__status--success * {
    color: inherit !important;
    -webkit-text-fill-color: inherit;
}
.gmodal .guest-upload__status--success i {
    font-size: 3rem !important;
    color: #10b981 !important;
    -webkit-text-fill-color: #10b981;
    display: block !important;
    margin-bottom: 0.75rem !important;
}

@keyframes gmodal-fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes gmodal-slide { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Mobile */
@media (max-width: 480px) {
    .gmodal { padding: 0; align-items: flex-end; }
    .gmodal__dialog {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 16px 16px 0 0;
        animation: gmodal-slide-up 0.25s ease-out;
    }
    .gmodal__body { padding: 1.5rem 1.25rem 1.25rem; }
    .guest-upload__title { font-size: 1.25rem; }
    .guest-dropzone { padding: 2rem 0.75rem; }
    .guest-dropzone__icon { font-size: 2rem; }
}
@keyframes gmodal-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
