/**
 * Frontend styles for Executive Applicant Manager
 * @package ExecutiveApplicantManager
 */

.eam-form-wrapper {
    max-width: 960px;
    margin: 30px auto;
    font-family: "CSPraJad", sans-serif !important;
    font-size: 18px;
    color: #1f2937;
    line-height: 1.6;
    box-sizing: border-box;
}

.eam-form-wrapper *,
.eam-form-wrapper *::before,
.eam-form-wrapper *::after {
    box-sizing: border-box;
    font-family: "CSPraJad", sans-serif !important;
}

.eam-form-wrapper input,
.eam-form-wrapper select,
.eam-form-wrapper textarea,
.eam-form-wrapper button,
.eam-form-wrapper label {
    font-family: "CSPraJad", sans-serif !important;
}

/* -------------------------------------------------------------
 * Alert Notification
 * ------------------------------------------------------------- */
.eam-alert {
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 24px;
    border: 1px solid transparent;
    line-height: 1.5;
}

.eam-alert-error {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.eam-alert-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

/* -------------------------------------------------------------
 * Form Section Containers
 * ------------------------------------------------------------- */
.eam-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 24px;
    padding: 28px 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.eam-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 24px;
}

.eam-section-badge {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.eam-section-title-wrap {
    flex: 1;
}

.eam-section-title {
    margin: 0 0 6px 0;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
}

.eam-section-subtitle {
    margin: 0;
    font-size: 16px;
    color: #64748b;
}

/* -------------------------------------------------------------
 * Form Controls & Grids
 * ------------------------------------------------------------- */
.eam-grid {
    display: grid;
    gap: 20px;
}

.eam-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.eam-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.eam-col-span-2 {
    grid-column: span 2;
}

.eam-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.eam-label {
    font-size: 18px;
    font-weight: 600;
    color: #334155;
    line-height: 1.4;
}

.eam-required {
    color: #ef4444;
    font-weight: 700;
}

.eam-input,
.eam-select,
.eam-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 17px;
    color: #1e293b;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.eam-input:focus,
.eam-select:focus,
.eam-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.eam-input.eam-field-error,
.eam-select.eam-field-error,
.eam-textarea.eam-field-error {
    border-color: #ef4444;
    background-color: #fffaf0;
}

.eam-field-hint {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
}

/* Radio Group */
.eam-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 6px;
}

.eam-radio-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
}

.eam-radio-label input[type="radio"] {
    accent-color: #2563eb;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* -------------------------------------------------------------
 * Section 01: Profile Photo
 * ------------------------------------------------------------- */
.eam-photo-upload-container {
    display: flex;
    align-items: center;
    gap: 28px;
}

.eam-photo-preview-box {
    width: 130px;
    height: 165px;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.eam-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    text-align: center;
    padding: 10px;
}

.eam-photo-icon {
    width: 44px;
    height: 44px;
    stroke-width: 1.5;
}

.eam-photo-placeholder-text {
    font-size: 11px;
    font-weight: 500;
}

.eam-photo-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eam-photo-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.eam-file-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* -------------------------------------------------------------
 * Buttons & Badges
 * ------------------------------------------------------------- */
.eam-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.eam-btn-upload,
.eam-btn-file-select {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}

.eam-btn-upload:hover,
.eam-btn-file-select:hover {
    background-color: #e2e8f0;
    border-color: #94a3b8;
    color: #0f172a;
}

.eam-upload-icon,
.eam-file-icon {
    width: 16px;
    height: 16px;
}

.eam-btn-text-danger {
    background: none;
    border: none;
    color: #dc2626;
    padding: 4px 8px;
    font-size: 13px;
    cursor: pointer;
}

.eam-btn-text-danger:hover {
    text-decoration: underline;
}

.eam-btn-submit {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    padding: 16px 40px;
    min-width: 260px;
    box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.25);
    transition: all 0.2s ease;
}

.eam-btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #172554 0%, #1e40af 100%);
    box-shadow: 0 6px 10px -1px rgba(30, 58, 138, 0.35);
}

.eam-btn-submit:disabled,
.eam-btn-submit.eam-btn-disabled {
    background: #94a3b8 !important;
    color: #f1f5f9 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.eam-btn-outline {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
    padding: 10px 24px;
}

.eam-btn-outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

/* File Selected Green Badge */
.eam-file-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    font-size: 13px;
    color: #065f46;
    font-weight: 500;
    margin-top: 8px;
    word-break: break-all;
}

.eam-badge-icon {
    color: #10b981;
    font-weight: 700;
    flex-shrink: 0;
}

.eam-badge-clear {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 12px;
    padding: 0 4px;
    margin-left: 4px;
    line-height: 1;
}

.eam-badge-clear:hover {
    color: #dc2626;
}

/* -------------------------------------------------------------
 * Section 05: 8 Dedicated Upload Slots
 * ------------------------------------------------------------- */
.eam-docs-wrapper {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.eam-docs-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.eam-docs-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.eam-docs-note {
    font-size: 12px;
    color: #64748b;
}

.eam-docs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.eam-doc-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.eam-doc-card:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.eam-doc-card.eam-doc-has-file {
    background: #f0fdf4;
    border-color: #86efac;
}

.eam-doc-card-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.eam-doc-num {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    background: #e2e8f0;
    padding: 3px 8px;
    border-radius: 4px;
}

.eam-doc-label {
    font-size: 17px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.45;
    cursor: pointer;
}

.eam-doc-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.eam-doc-input-wrap {
    display: flex;
    align-items: center;
}

.eam-doc-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* -------------------------------------------------------------
 * Section 06: Consent Checkboxes
 * ------------------------------------------------------------- */
.eam-consent-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.eam-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 17px;
    color: #334155;
    line-height: 1.6;
    cursor: pointer;
}

.eam-checkbox-label input[type="checkbox"] {
    accent-color: #2563eb;
    width: 22px;
    height: 22px;
    margin-top: 3px;
    flex-shrink: 0;
    cursor: pointer;
}

/* -------------------------------------------------------------
 * Form Actions & Submit
 * ------------------------------------------------------------- */
.eam-form-actions {
    text-align: center;
    padding: 16px 0 32px 0;
}

.eam-submit-note {
    font-size: 14px;
    color: #64748b;
    margin-top: 28px;
    line-height: 1.6;
}

.eam-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: eam-spin 0.8s linear infinite;
}

@keyframes eam-spin {
    to { transform: rotate(360deg); }
}

/* -------------------------------------------------------------
 * Success Screen Card
 * ------------------------------------------------------------- */
.eam-success-card {
    display: none;
    background: #ffffff;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    padding: 56px 40px;
    max-width: 720px;
    margin: 40px auto 50px auto;
    text-align: center;
    box-shadow: 0 20px 40px -10px rgba(16, 185, 129, 0.15), 0 1px 3px rgba(0, 0, 0, 0.05);
}

.eam-success-card.is-active,
.eam-success-card.eam-visible {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.eam-success-card * {
    text-align: center !important;
}

.eam-success-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: #dcfce7;
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto !important;
}

.eam-success-icon {
    width: 40px;
    height: 40px;
}

.eam-success-title {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 auto 12px auto !important;
    text-align: center !important;
    width: 100%;
}

.eam-success-desc {
    font-size: 16px;
    color: #475569;
    max-width: 600px;
    margin: 0 auto 24px auto !important;
    text-align: center !important;
    width: 100%;
}

.eam-ref-code-box {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px;
    background-color: #f0fdf4;
    border: 2px dashed #86efac;
    padding: 16px 32px;
    border-radius: 12px;
    margin: 0 auto 24px auto !important;
    text-align: center !important;
}

.eam-ref-code-label {
    font-size: 13px;
    font-weight: 600;
    color: #166534;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center !important;
}

.eam-ref-code-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 30px;
    font-weight: 800;
    color: #15803d;
    letter-spacing: 1.5px;
    text-align: center !important;
}

.eam-success-hint {
    font-size: 14px;
    color: #64748b;
    margin: 0 auto !important;
    text-align: center !important;
    max-width: 600px;
    width: 100%;
}

/* -------------------------------------------------------------
 * Responsive Layout
 * ------------------------------------------------------------- */
@media (max-width: 768px) {
    .eam-section {
        padding: 20px 18px;
    }

    .eam-grid-2,
    .eam-grid-3,
    .eam-docs-grid {
        grid-template-columns: 1fr;
    }

    .eam-col-span-2 {
        grid-column: span 1;
    }

    .eam-photo-upload-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .eam-photo-controls {
        align-items: center;
    }

    .eam-btn-submit {
        width: 100%;
    }

    .eam-ref-code-value {
        font-size: 24px;
    }
}

/* -------------------------------------------------------------
 * Application Closed Notice Container
 * ------------------------------------------------------------- */
.eam-closed-container,
.eam-closed-container * {
    font-family: "CSPraJad", sans-serif !important;
}

.eam-closed-container {
    max-width: 720px;
    margin: 40px auto;
    padding: 0 16px;
}

.eam-closed-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 48px 32px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.eam-closed-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 50%;
    margin-bottom: 24px;
}

.eam-closed-title {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px 0;
}

.eam-closed-divider {
    width: 60px;
    height: 3px;
    background: #cbd5e1;
    margin: 0 auto 20px auto;
    border-radius: 2px;
}

.eam-closed-message {
    font-size: 16px;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 24px 0;
}

.eam-closed-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
}

.eam-closed-meta-label {
    color: #64748b;
    font-weight: 500;
}

.eam-closed-meta-value {
    color: #0f172a;
    font-weight: 600;
}

/* -------------------------------------------------------------
 * Custom Application Sections (Edu & Exp)
 * ------------------------------------------------------------- */
.eam-edu-card,
.eam-exp-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px 24px;
}

.eam-edu-title,
.eam-exp-title {
    margin: 0 0 14px 0;
    font-size: 19px;
    font-weight: 600;
    color: #1e293b;
}

.eam-duration-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.eam-input-inline {
    width: 90px !important;
    text-align: center;
}

@media (max-width: 640px) {
    .eam-grid-2,
    .eam-grid-3 {
        grid-template-columns: 1fr;
    }
    .eam-col-span-2 {
        grid-column: span 1;
    }
}

