/**
 * Candidate Workflow Styles
 *
 * Styles for candidate-facing screening pages
 * No sidebar, simplified header/footer
 */

/* Body and wrapper */
body.sagescreen-candidate,
body.sagescreen-login {
    margin: 0;
    padding: 0;
    background-color: var(--ss-color-bg-hover);
    overflow: auto !important; /* Override fe-menu.css body overflow:hidden */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.candidate-wrapper {
    width: 100%;
    padding-top: 80px; /* Height of header */
}

.candidate-main-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.candidate-content {
    width: 100%;
}

.sagescreen-candidate-container {
    width: 100%;
}

/* Header */
.candidate-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--ss-color-bg);
    border-bottom: 1px solid var(--ss-color-border-light);
    z-index: 1000;
    box-shadow: var(--ss-shadow-card);
}

.candidate-header-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.candidate-header .logo {
    display: flex;
    align-items: center;
}

.candidate-logo {
    height: 50px;
    width: auto;
}

.help-menu {
    display: flex;
    align-items: center;
}

.help-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--ss-color-brand-hover);
    border: 1px solid var(--ss-color-border-light);
    border-radius: 8px;
    color: var(--ss-color-text-inverse);
    font-size: var(--ss-font-size-website);
    font-weight: var(--ss-font-weight-semibold);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.help-button:hover {
    background: var(--ss-color-brand);
    border-color: var(--ss-color-brand);
    color: var(--ss-color-text-inverse);
}

.help-icon {
    stroke-width: 2;
}

/* Footer */
.candidate-footer {
    position: static;
    width: 100%;
    height: 80px;
    background: var(--ss-color-bg);
    border-top: 1px solid var(--ss-color-border-light);
    margin-top: auto;
}

.candidate-footer-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-text {
    margin: 0;
    font-size: var(--ss-font-size-meta);
    color: var(--ss-color-text-light);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-link {
    font-size: var(--ss-font-size-meta);
    color: var(--ss-color-text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--ss-color-text);
    text-decoration: underline;
}

.footer-separator {
    color: var(--ss-color-border-light);
}

/* Help Modal */
.help-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-modal.hidden {
    display: none;
}

.help-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(245, 245, 245, 0.5);
}

.help-modal-content {
    position: relative;
    background: var(--ss-color-bg);
    border-radius: var(--ss-card-border-radius);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.help-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--ss-color-border-light);
}

.help-modal-header h2 {
    margin: 0;
    font-size: var(--ss-font-size-h4);
    font-weight: var(--ss-font-weight-bold);
    color: var(--ss-color-text);
}

.help-modal-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--ss-color-text-light);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-modal-close:hover {
    color: var(--ss-color-text);
}

.help-modal-body {
    padding: 2rem;
}

.help-modal-body h3 {
    margin: 0 0 1.5rem 0;
    font-size: var(--ss-font-size-h5);
    font-weight: var(--ss-font-weight-semibold);
    color: var(--ss-color-text);
}

.help-section {
    margin-bottom: 1.5rem;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section h4 {
    margin: 0 0 0.5rem 0;
    font-size: var(--ss-font-size-website);
    font-weight: var(--ss-font-weight-semibold);
    color: var(--ss-color-text);
}

.help-section p {
    margin: 0;
    font-size: var(--ss-font-size-website);
    line-height: var(--ss-line-height-website);
    color: var(--ss-color-text-light);
}

.help-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--ss-color-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* When only close link exists, push it to the right */
.help-modal-footer .help-modal-close-link:only-child {
    margin-left: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .candidate-header-container {
        padding: 0 1rem;
    }

    .candidate-logo {
        height: 40px;
    }

    .help-button span {
        display: none;
    }

    .help-button {
        padding: 10px;
    }

    .footer-content {
        font-size: 12px;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .help-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .help-modal-header,
    .help-modal-body,
    .help-modal-footer {
        padding: 1rem 1.5rem;
    }
}

/* Utility */
.hidden {
    display: none !important;
}

/* Ensure Help button anchor overrides global link styles */
body.sagescreen-candidate a.help-button,
body.sagescreen-route a.help-button {
    color: var(--ss-color-text-inverse) !important;
}
body.sagescreen-candidate a.help-button:hover,
body.sagescreen-candidate a.help-button:focus,
body.sagescreen-route a.help-button:hover,
body.sagescreen-route a.help-button:focus {
    color: var(--ss-color-text-inverse) !important;
}

/* Help button icon fix */
.help-button .help-icon {
    flex-shrink: 0;
    overflow: visible;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
}
.help-button .help-icon circle,
.help-button .help-icon path,
.help-button .help-icon line {
    stroke: currentColor;
    stroke-width: 2;
}

/* Help modal close link */
.help-modal-close-link {
    color: var(--ss-color-brand);
    font-size: var(--ss-font-size-h5);
    font-weight: var(--ss-font-weight-semibold);
    text-decoration: none;
    cursor: pointer;
    padding: 8px 16px;
}
.help-modal-close-link:hover {
    color: var(--ss-color-brand-hover);
    text-decoration: underline;
}

/* External help link in modal footer */
.help-modal-external-link {
    color: var(--ss-color-brand);
    font-size: 14px;
    text-decoration: none;
}
.help-modal-external-link:hover {
    text-decoration: underline;
}

/* Contact Recruiter Modal Styles */
.contact-recruiter-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.contact-recruiter-info p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--ss-color-text);
}

.contact-recruiter-info p:last-child {
    margin-bottom: 0;
}

.contact-recruiter-field {
    margin-bottom: 16px;
}

.contact-recruiter-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--ss-color-text);
    margin-bottom: 8px;
}

.contact-recruiter-field label .required {
    color: #dc2626;
}

.contact-recruiter-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
}

.contact-recruiter-field textarea:focus {
    outline: none;
    border-color: var(--ss-color-brand);
    box-shadow: 0 0 0 3px rgba(106, 153, 106, 0.1);
}

.contact-recruiter-already-sent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    padding: 16px;
}

.contact-recruiter-already-sent svg {
    width: 24px;
    height: 24px;
    color: #059669;
    flex-shrink: 0;
}

.contact-recruiter-already-sent p {
    margin: 0;
    font-size: 14px;
    color: #065f46;
    line-height: 1.5;
}
