/* ==============================================
   AI Resume Analyzer — Stylesheet
   ============================================== */

/* ── Root ───────────────────────────────────── */
#ara-root {
    max-width: 700px;
    margin: 2.5em auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    color: #1e293b;
    line-height: 1.6;
}

/* ── Header ─────────────────────────────────── */
.ara-header {
    padding: 2.25em 2em 2em;
    background: linear-gradient(135deg, #2B70CA 0%, #1a56a0 100%);
    border-radius: 14px 14px 0 0;
    color: #fff;
    text-align: center;
}
.ara-title {
    margin: 0 0 0.3em;
    font-size: 1.55em;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
}
.ara-subtitle {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.82;
}

/* ── Form card ──────────────────────────────── */
.ara-form {
    background: #fff;
    padding: 2em 2em 1.75em;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.07);
}

/* ── Fields ─────────────────────────────────── */
.ara-field {
    margin-bottom: 1.2em;
}
.ara-label {
    display: block;
    font-size: 0.82em;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.35em;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.ara-input {
    display: block;
    width: 100%;
    padding: 0.65em 0.9em;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95em;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    box-sizing: border-box;
}
.ara-input::placeholder { color: #94a3b8; }
.ara-input:focus {
    outline: none;
    border-color: #2B70CA;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(43, 112, 202, 0.14);
}

/* ── File upload ────────────────────────────── */
.ara-file-wrap {
    position: relative;
}
.ara-file-wrap input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}
.ara-file-ui {
    display: flex;
    align-items: center;
    gap: 0.9em;
    padding: 0.85em 1em;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    transition: border-color 0.18s, background 0.18s;
    cursor: pointer;
}
.ara-file-wrap:hover .ara-file-ui,
.ara-file-wrap:focus-within .ara-file-ui {
    border-color: #2B70CA;
    background: #e8f1fb;
}
.ara-file-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: #ddeaf8;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    color: #2B70CA;
    font-weight: 700;
}
.ara-file-text { font-size: 0.88em; color: #475569; }
.ara-file-text small {
    display: block;
    color: #94a3b8;
    font-size: 0.9em;
    margin-top: 0.1em;
}
.ara-file-name {
    font-weight: 600;
    color: #2B70CA;
    word-break: break-all;
}

/* ── Submit button ──────────────────────────── */
.ara-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55em;
    width: 100%;
    padding: 0.8em 1.5em;
    margin-top: 0.4em;
    background: linear-gradient(135deg, #2B70CA 0%, #1a56a0 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.18s, transform 0.1s;
    letter-spacing: 0.01em;
}
.ara-btn:hover:not(:disabled) { opacity: 0.9; }
.ara-btn:active:not(:disabled) { transform: scale(0.985); }
.ara-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Spinner */
.ara-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ara-spin 0.65s linear infinite;
    flex-shrink: 0;
}
.ara-btn.is-loading .ara-spinner { display: block; }

@keyframes ara-spin { to { transform: rotate(360deg); } }

/* ── Messages ───────────────────────────────── */
.ara-messages {
    min-height: 1.2em;
    margin-top: 0.9em;
    font-size: 0.875em;
    text-align: center;
    color: #dc2626;
    border-radius: 6px;
    transition: all 0.2s;
}
.ara-messages:not(:empty) {
    padding: 0.6em 0.9em;
    background: #fef2f2;
    border: 1px solid #fecaca;
}
.ara-messages.is-info {
    color: #2B70CA;
    background: #e8f1fb;
    border-color: #b3cef0;
}

/* ── Results ────────────────────────────────── */
.ara-result { margin-top: 2em; }

.ara-result-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    margin-bottom: 1.1em;
}
.ara-result-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    background: #d1fae5;
    color: #065f46;
    font-size: 0.78em;
    font-weight: 700;
    padding: 0.25em 0.75em;
    border-radius: 999px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.ara-result-badge::before {
    content: '\2713';
    font-size: 1em;
}

/* Result cards grid */
.ara-cards { display: grid; gap: 1em; }

.ara-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 1.25em 1.4em;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

/* Card section headings */
.ara-card-title {
    margin: 0 0 0.9em;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 0.45em;
}
.ara-card-title-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Skills */
.ara-card--skills .ara-card-title { color: #2B70CA; }
.ara-card--skills .ara-card-title-dot { background: #2B70CA; }
.ara-skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45em;
    list-style: none;
    margin: 0;
    padding: 0;
}
.ara-skills-list li {
    background: #e8f1fb;
    color: #1a56a0;
    padding: 0.3em 0.8em;
    border-radius: 999px;
    font-size: 0.85em;
    font-weight: 500;
    border: 1px solid #b3cef0;
}

/* Experience */
.ara-card--experience .ara-card-title { color: #0e7490; }
.ara-card--experience .ara-card-title-dot { background: #06b6d4; }
.ara-exp-item {
    padding: 0.8em 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9em;
    line-height: 1.55;
}
.ara-exp-item:first-child { padding-top: 0; }
.ara-exp-item:last-child { padding-bottom: 0; border-bottom: none; }
.ara-exp-role { font-weight: 600; color: #0e7490; }
.ara-exp-company { color: #1e293b; }
.ara-exp-years {
    display: inline-block;
    font-size: 0.8em;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.1em 0.5em;
    border-radius: 4px;
    margin-left: 0.3em;
    font-weight: 500;
}
.ara-exp-summary { margin-top: 0.3em; color: #475569; }

/* Improvements */
.ara-card--improvements .ara-card-title { color: #b45309; }
.ara-card--improvements .ara-card-title-dot { background: #f59e0b; }
.ara-improvements-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55em;
}
.ara-improvements-list li {
    display: flex;
    gap: 0.6em;
    font-size: 0.88em;
    line-height: 1.55;
    color: #374151;
}
.ara-improvements-list li::before {
    content: '\2192';
    color: #f59e0b;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0.05em;
}

/* ── PDF download ───────────────────────────── */
.ara-pdf-wrap { margin-top: 1.25em; text-align: center; }
.ara-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.72em 1.75em;
    background: #059669;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92em;
    transition: background 0.18s, transform 0.1s;
    letter-spacing: 0.01em;
}
.ara-pdf-btn::before { content: '\2193\0020'; font-size: 1.1em; }
.ara-pdf-btn:hover { background: #047857; }
.ara-pdf-btn:active { transform: scale(0.97); }
.ara-pdf-note {
    margin-top: 0.5em;
    font-size: 0.8em;
    color: #94a3b8;
}
