/* ==========================================================================
   Risel – Shared Tool Pages Design System (tools-common.css)
   Unified layout, spacing scale, typography, form controls, buttons & pills
   Applied across: Cover Letter, Job Tracker, Mock Interview, ATS Scanner
   ========================================================================== */

/* --- SHARED CONTAINER & LAYOUT --- */
.tool-page {
    background-color: #FAFAFC;
    color: var(--text-main, #0f172a);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    padding-bottom: 64px;
}

.tool-container {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

/* --- HERO SECTION --- */
.tool-hero {
    padding: 32px 0 16px;
    text-align: center;
    position: relative;
}

.tool-hero-inner {
    max-width: 760px;
    margin: 0 auto;
}

.tool-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 102, 255, 0.08);
    color: var(--primary, #0066FF);
    font-size: 12.5px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 12px;
    border: 1px solid rgba(0, 102, 255, 0.15);
    letter-spacing: 0.2px;
}

.tool-hero-title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -0.8px;
    color: #0f172a;
    margin: 0 0 10px;
    padding-top: 6px;
    padding-bottom: 4px;
    overflow: visible;
}

.tool-hero-accent {
    background: linear-gradient(135deg, #0066FF 0%, #00b4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline;
}

.tool-hero-desc {
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    line-height: 1.5;
    color: #475569;
    max-width: 640px;
    margin: 0 auto;
    overflow: visible;
}

/* --- WORKSPACE GRID & CARDS --- */
.tool-workspace {
    margin-top: 32px;
}

.tool-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 28px 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.03);
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.04);
}

.tool-card-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.tool-card-title {
    font-family: 'Sora', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px;
}

.tool-card-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    color: #64748b;
    margin: 0;
}

/* --- FORM SECTIONS & FIELDS --- */
.form-section {
    margin-bottom: 24px;
}

.form-field {
    margin-bottom: 20px;
}

.form-field:last-child {
    margin-bottom: 0;
}

.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.form-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
}

.form-label-row .form-label {
    margin-bottom: 0;
}

/* --- UNIFIED FORM INPUTS, SELECTS, & TEXTAREAS --- */
.tool-input,
.tool-select,
.tool-textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #0f172a;
    background-color: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.tool-input:focus,
.tool-select:focus,
.tool-textarea:focus {
    border-color: #0066FF;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.12);
}

.tool-input::placeholder,
.tool-textarea::placeholder {
    color: #94a3b8;
}

/* Custom Select Dropdown Arrow */
.tool-select {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    cursor: pointer;
}

.tool-textarea {
    resize: vertical;
    min-height: 120px;
}

/* --- BUTTONS & PILLS --- */
.tool-primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: #0066FF;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 102, 255, 0.2);
    text-decoration: none;
}

.tool-primary-btn:hover {
    background: #0052cc;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 102, 255, 0.3);
}

.tool-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: #ffffff;
    color: #0f172a;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.tool-secondary-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0066FF;
}

.tool-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tool-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 100px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.tool-pill:hover {
    border-color: rgba(0, 102, 255, 0.3);
    color: #0066FF;
    background: #ffffff;
}

.tool-pill.active {
    background: rgba(0, 102, 255, 0.08);
    color: #0066FF;
    border-color: #0066FF;
}

/* --- TOOLBAR --- */
.tool-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.tool-toolbar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* --- EMPTY STATE --- */
.tool-empty-state {
    padding: 48px 24px;
    text-align: center;
    background: #ffffff;
    border: 1.5px dashed #cbd5e1;
    border-radius: 18px;
    margin: 20px 0;
}

.tool-empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: 12px;
    background: rgba(0, 102, 255, 0.08);
    color: #0066FF;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-empty-title {
    font-family: 'Sora', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
}

.tool-empty-desc {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #64748b;
    max-width: 440px;
    margin: 0 auto 20px;
}

/* --- RESPONSIVE BREAKPOINTS --- */
@media (max-width: 992px) {
    .tool-card {
        padding: 24px;
    }
    .tool-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 768px) {
    .tool-container {
        padding-left: 18px;
        padding-right: 18px;
    }
}
