/**
 * Jobzonwallah AI - Main Stylesheet
 * Modern, clean styling for AI-powered career tools
 */

/* =====================================
   Variables & Base
   ===================================== */
:root {
    --jzai-primary: #6366f1;
    --jzai-primary-dark: #4f46e5;
    --jzai-primary-light: #a5b4fc;
    --jzai-accent: #22d3ee;
    --jzai-accent-dark: #06b6d4;
    --jzai-success: #22c55e;
    --jzai-warning: #f59e0b;
    --jzai-danger: #ef4444;
    --jzai-bg: #ffffff;
    --jzai-bg-alt: #f8fafc;
    --jzai-bg-card: #ffffff;
    --jzai-text: #0f172a;
    --jzai-text-secondary: #64748b;
    --jzai-border: #e2e8f0;
    --jzai-radius: 12px;
    --jzai-radius-sm: 8px;
    --jzai-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --jzai-shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --jzai-transition: all 0.2s ease;
}

/* =====================================
   Toast Notifications
   ===================================== */
.jzai-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 24px;
    border-radius: var(--jzai-radius-sm);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    z-index: 99999;
    transform: translateY(20px);
    opacity: 0;
    transition: var(--jzai-transition);
    box-shadow: var(--jzai-shadow-lg);
    max-width: 400px;
}
.jzai-toast.show { transform: translateY(0); opacity: 1; }
.jzai-toast-success { background: var(--jzai-success); }
.jzai-toast-error { background: var(--jzai-danger); }
.jzai-toast-info { background: var(--jzai-primary); }
.jzai-toast-warning { background: var(--jzai-warning); }

/* =====================================
   Buttons
   ===================================== */
.jzai-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--jzai-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--jzai-transition);
    text-decoration: none;
    line-height: 1.4;
}
.jzai-btn:hover { transform: translateY(-1px); box-shadow: var(--jzai-shadow); }
.jzai-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.jzai-btn-primary { background: var(--jzai-primary); color: #fff; }
.jzai-btn-primary:hover { background: var(--jzai-primary-dark); }
.jzai-btn-secondary { background: var(--jzai-bg-alt); color: var(--jzai-text); border: 1px solid var(--jzai-border); }
.jzai-btn-accent { background: linear-gradient(135deg, var(--jzai-primary), var(--jzai-accent)); color: #fff; }
.jzai-btn-accent:hover { box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4); }
.jzai-btn-danger { background: var(--jzai-danger); color: #fff; }
.jzai-btn-small { padding: 6px 12px; font-size: 12px; }
.jzai-btn-full { width: 100%; justify-content: center; }

/* =====================================
   Forms
   ===================================== */
.jzai-form { max-width: 800px; }
.jzai-field { margin-bottom: 16px; }
.jzai-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--jzai-text);
    margin-bottom: 6px;
}
.jzai-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.jzai-field-full { grid-column: 1 / -1; }
.jzai-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--jzai-border);
    border-radius: var(--jzai-radius-sm);
    font-size: 14px;
    color: var(--jzai-text);
    background: var(--jzai-bg);
    transition: var(--jzai-transition);
    box-sizing: border-box;
}
.jzai-input:focus { outline: none; border-color: var(--jzai-primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); }
.jzai-textarea { resize: vertical; min-height: 80px; font-family: inherit; }
select.jzai-input { cursor: pointer; }

/* =====================================
   Resume Builder
   ===================================== */
.jzai-resume {
    background: var(--jzai-bg);
    border-radius: var(--jzai-radius);
    box-shadow: var(--jzai-shadow);
    padding: 32px;
    max-width: 960px;
    margin: 0 auto;
}

/* Wizard Steps */
.jzai-wizard-header { text-align: center; margin-bottom: 32px; }
.jzai-wizard-header h2 { margin: 0 0 8px; font-size: 28px; color: var(--jzai-text); }
.jzai-wizard-header p { color: var(--jzai-text-secondary); margin: 0; }

.jzai-step-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}
.jzai-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--jzai-text-secondary);
    background: var(--jzai-bg-alt);
    transition: var(--jzai-transition);
}
.jzai-step.active { background: var(--jzai-primary); color: #fff; }
.jzai-step.done { background: var(--jzai-success); color: #fff; }
.jzai-step-num {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255,255,255,0.2);
}

.jzai-wizard-content { margin-bottom: 24px; }
.jzai-wizard-content h3 { margin: 0 0 20px; font-size: 22px; color: var(--jzai-text); }
.jzai-wizard-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--jzai-border);
}

/* Template Picker */
.jzai-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin: 24px 0;
}
.jzai-template-card {
    cursor: pointer;
    border: 2px solid var(--jzai-border);
    border-radius: var(--jzai-radius);
    overflow: hidden;
    transition: var(--jzai-transition);
    background: var(--jzai-bg);
}
.jzai-template-card:hover { border-color: var(--jzai-primary); transform: translateY(-2px); box-shadow: var(--jzai-shadow-lg); }
.jzai-template-thumb { height: 280px; overflow: hidden; background: var(--jzai-bg-alt); }
.jzai-template-thumb img { width: 100%; height: 100%; object-fit: cover; }
.jzai-template-info {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.jzai-template-name { font-weight: 600; font-size: 14px; }

.jzai-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}
.jzai-badge-free { background: #dcfce7; color: #15803d; }
.jzai-badge-premium { background: #fef3c7; color: #b45309; }

/* Experience Items */
.jzai-experience-item,
.jzai-education-item {
    background: var(--jzai-bg-alt);
    border: 1px solid var(--jzai-border);
    border-radius: var(--jzai-radius-sm);
    padding: 20px;
    margin-bottom: 16px;
}

/* Template Switcher */
.jzai-template-switcher {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--jzai-bg-alt);
    border-radius: var(--jzai-radius-sm);
    font-size: 13px;
}
.jzai-template-switcher select { max-width: 180px; }
.jzai-hint { color: var(--jzai-text-secondary); font-size: 12px; }

/* Preview */
.jzai-preview-toggle {
    cursor: pointer;
    color: var(--jzai-primary);
    font-weight: 600;
    font-size: 14px;
    margin-top: 16px;
}
.jzai-preview-content {
    background: var(--jzai-bg);
    border: 1px solid var(--jzai-border);
    border-radius: var(--jzai-radius);
    padding: 24px;
    margin-top: 12px;
}

/* Review Step */
.jzai-review-card {
    background: linear-gradient(135deg, var(--jzai-primary), var(--jzai-accent));
    color: #fff;
    padding: 24px;
    border-radius: var(--jzai-radius);
    margin-bottom: 20px;
}
.jzai-review-card h4 { margin: 0 0 8px; font-size: 24px; }
.jzai-review-card p { margin: 0; opacity: 0.9; }
.jzai-review-section { margin-bottom: 20px; }
.jzai-review-section h4 { border-bottom: 2px solid var(--jzai-border); padding-bottom: 8px; margin-bottom: 12px; }
.jzai-review-item { padding: 8px 0; }

/* Success */
.jzai-success { text-align: center; padding: 60px 20px; }
.jzai-success h3 { font-size: 28px; margin-bottom: 24px; color: var(--jzai-success); }

/* =====================================
   ATS Checker
   ===================================== */
.jzai-ats { max-width: 800px; margin: 0 auto; }
.jzai-ats-header { text-align: center; margin-bottom: 32px; }
.jzai-ats-header h2 { margin: 0 0 8px; font-size: 28px; }

.jzai-ats-dropzone {
    border: 2px dashed var(--jzai-border);
    border-radius: var(--jzai-radius);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--jzai-transition);
    background: var(--jzai-bg-alt);
}
.jzai-ats-dropzone:hover,
.jzai-ats-dropzone.dragover { border-color: var(--jzai-primary); background: #eef2ff; }
.jzai-ats-dropzone-icon { font-size: 48px; margin-bottom: 12px; }
.jzai-ats-upload-hint { text-align: center; color: var(--jzai-text-secondary); font-size: 13px; margin: 8px 0 24px; }

.jzai-ats-file-selected {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
}
.jzai-ats-file-size { color: var(--jzai-text-secondary); font-weight: 400; font-size: 14px; }

.jzai-ats-job-description { margin: 20px 0; }

/* Score Display */
.jzai-ats-score-section {
    display: flex;
    gap: 32px;
    align-items: center;
    margin-bottom: 32px;
    padding: 24px;
    background: var(--jzai-bg-alt);
    border-radius: var(--jzai-radius);
}
.jzai-ats-score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 6px solid var(--jzai-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.jzai-ats-score-value { font-size: 36px; font-weight: 800; color: var(--jzai-primary); }
.jzai-ats-score-label { font-size: 12px; color: var(--jzai-text-secondary); text-transform: uppercase; letter-spacing: 1px; }

.jzai-ats-score-bars { flex: 1; }
.jzai-score-bar { margin-bottom: 12px; }
.jzai-score-bar span { font-size: 14px; font-weight: 500; display: block; margin-bottom: 4px; }
.jzai-bar-track {
    height: 8px;
    background: var(--jzai-border);
    border-radius: 4px;
    overflow: hidden;
}
.jzai-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--jzai-primary), var(--jzai-accent));
    border-radius: 4px;
    transition: width 1s ease;
}

.jzai-ats-feedback { background: var(--jzai-bg); border: 1px solid var(--jzai-border); border-radius: var(--jzai-radius); padding: 24px; }
.jzai-ats-suggestions { list-style: none; padding: 0; }
.jzai-ats-suggestions li { padding: 8px 0 8px 24px; position: relative; }
.jzai-ats-suggestions li::before { content: '💡'; position: absolute; left: 0; }

/* =====================================
   Tags
   ===================================== */
.jzai-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.jzai-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.jzai-tag-warning { background: #fef3c7; color: #b45309; }
.jzai-tag-technical { background: #e0e7ff; color: #4338ca; }
.jzai-tag-behavioral { background: #dbeafe; color: #1d4ed8; }
.jzai-tag-situational { background: #fce7f3; color: #be185d; }
.jzai-tag-leadership { background: #f3e8ff; color: #7c3aed; }
.jzai-tag-easy { background: #dcfce7; color: #15803d; }
.jzai-tag-medium { background: #fef3c7; color: #b45309; }
.jzai-tag-hard { background: #fee2e2; color: #b91c1c; }

/* =====================================
   Cover Letter
   ===================================== */
.jzai-cover-letter { max-width: 800px; margin: 0 auto; }
.jzai-cover-letter h2 { text-align: center; }
.jzai-cl-result {
    margin-top: 32px;
    padding: 24px;
    background: var(--jzai-bg);
    border: 1px solid var(--jzai-border);
    border-radius: var(--jzai-radius);
}
.jzai-cl-content {
    white-space: pre-wrap;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.7;
    padding: 24px;
    background: var(--jzai-bg-alt);
    border-radius: var(--jzai-radius-sm);
    margin: 16px 0;
}

/* =====================================
   Job Description
   ===================================== */
.jzai-job-desc { max-width: 800px; margin: 0 auto; }
.jzai-job-desc h2 { text-align: center; }
.jzai-jd-generated {
    margin-top: 32px;
    padding: 24px;
    background: var(--jzai-bg);
    border: 1px solid var(--jzai-border);
    border-radius: var(--jzai-radius);
}
.jzai-jd-generated section { margin-bottom: 20px; }
.jzai-jd-generated h4 { color: var(--jzai-primary); border-bottom: 2px solid var(--jzai-border); padding-bottom: 8px; margin-bottom: 12px; }
.jzai-jd-generated ul { padding-left: 20px; }
.jzai-jd-generated li { padding: 4px 0; }
.jzai-jd-actions { display: flex; gap: 12px; margin-top: 20px; }

/* =====================================
   Interview Questions
   ===================================== */
.jzai-interview-questions { max-width: 800px; margin: 0 auto; }
.jzai-iq-filters {
    background: var(--jzai-bg-alt);
    padding: 16px 20px;
    border-radius: var(--jzai-radius);
    margin: 20px 0;
}
.jzai-filter-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.jzai-filter-group select { width: auto; min-width: 120px; }
.jzai-iq-list { margin-top: 16px; }
.jzai-iq-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--jzai-border);
}
.jzai-iq-item:last-child { border-bottom: none; }
.jzai-iq-number {
    width: 32px;
    height: 32px;
    background: var(--jzai-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}
.jzai-iq-content { flex: 1; }
.jzai-iq-question { font-weight: 500; line-height: 1.5; margin: 0 0 8px; }
.jzai-iq-meta { display: flex; gap: 8px; }
.jzai-iq-content details { margin-top: 8px; }
.jzai-iq-content summary { cursor: pointer; color: var(--jzai-primary); font-weight: 500; font-size: 13px; }
.jzai-iq-content details ul { margin: 8px 0 0; padding-left: 20px; }

/* =====================================
   Interview Bot - Chat Interface
   ===================================== */
.jzai-interview-bot { max-width: 700px; margin: 0 auto; }
.jzai-bot-header { text-align: center; margin-bottom: 24px; }
.jzai-bot-header h2 { margin: 0 0 8px; }

.jzai-bot-chat {
    background: var(--jzai-bg);
    border: 1px solid var(--jzai-border);
    border-radius: var(--jzai-radius);
    overflow: hidden;
}
.jzai-bot-messages {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    scroll-behavior: smooth;
}
.jzai-bot-message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.jzai-bot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.jzai-bot-message-bot .jzai-bot-avatar { background: #e0e7ff; }
.jzai-bot-message-user .jzai-bot-avatar { background: #dcfce7; }
.jzai-bot-message-feedback .jzai-bot-avatar { background: #fef3c7; }

.jzai-bot-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 14px;
    max-width: 80%;
}
.jzai-bot-message-bot .jzai-bot-bubble { background: var(--jzai-bg-alt); border: 1px solid var(--jzai-border); }
.jzai-bot-message-user .jzai-bot-bubble { background: var(--jzai-primary); color: #fff; border-radius: 12px 12px 4px 12px; }
.jzai-bot-message-feedback .jzai-bot-bubble {
    background: #fffbeb;
    border: 1px solid #fde68a;
    font-size: 13px;
    font-style: italic;
}

.jzai-bot-input-area {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid var(--jzai-border);
    background: var(--jzai-bg-alt);
}
.jzai-bot-input-area textarea { flex: 1; min-height: 44px; }
.jzai-bot-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--jzai-bg-alt);
    border-top: 1px solid var(--jzai-border);
    font-size: 13px;
}
.jzai-bot-status { color: var(--jzai-text-secondary); font-weight: 600; }

/* Report */
.jzai-bot-report { max-width: 700px; margin: 0 auto; text-align: center; }
.jzai-report-score {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 24px 0;
}
.jzai-report-score-value {
    font-size: 48px;
    font-weight: 800;
    color: var(--jzai-primary);
}
.jzai-report-score-label { font-size: 14px; color: var(--jzai-text-secondary); text-transform: uppercase; }
.jzai-report-details {
    text-align: left;
    background: var(--jzai-bg);
    border: 1px solid var(--jzai-border);
    border-radius: var(--jzai-radius);
    padding: 24px;
    margin: 24px 0;
}

/* =====================================
   Credit Wallet
   ===================================== */
.jzai-wallet { max-width: 900px; margin: 0 auto; }
.jzai-wallet-header { text-align: center; margin-bottom: 32px; }
.jzai-wallet-balance {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 40px;
    background: linear-gradient(135deg, var(--jzai-primary), var(--jzai-accent));
    border-radius: var(--jzai-radius);
    color: #fff;
    margin-top: 16px;
}
.jzai-balance-label { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.9; }
.jzai-balance-value { font-size: 48px; font-weight: 800; }
.jzai-balance-credits { font-size: 16px; opacity: 0.9; }

.jzai-packs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin: 32px 0;
}
.jzai-pack-card {
    text-align: center;
    padding: 32px 24px;
    background: var(--jzai-bg);
    border: 1px solid var(--jzai-border);
    border-radius: var(--jzai-radius);
    transition: var(--jzai-transition);
}
.jzai-pack-card:hover { transform: translateY(-2px); box-shadow: var(--jzai-shadow-lg); }
.jzai-pack-card h3 { margin: 0 0 12px; font-size: 20px; }
.jzai-pack-price { font-size: 32px; font-weight: 800; color: var(--jzai-primary); }
.jzai-pack-credits { font-size: 16px; color: var(--jzai-text-secondary); margin: 8px 0; }
.jzai-pack-per-credit { font-size: 13px; color: var(--jzai-text-secondary); margin-bottom: 16px; }

.jzai-txn-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.jzai-txn-table th { text-align: left; padding: 12px 8px; border-bottom: 2px solid var(--jzai-border); font-weight: 600; color: var(--jzai-text-secondary); }
.jzai-txn-table td { padding: 10px 8px; border-bottom: 1px solid var(--jzai-border); }
.jzai-txn-type { padding: 2px 8px; border-radius: 8px; font-size: 12px; font-weight: 600; }
.jzai-txn-purchase { background: #dcfce7; color: #15803d; }
.jzai-txn-debit { background: #fee2e2; color: #b91c1c; }
.jzai-txn-refund { background: #fef3c7; color: #b45309; }
.jzai-txn-credit { background: #e0e7ff; color: #4338ca; }
.jzai-txn-positive { color: var(--jzai-success); font-weight: 700; }
.jzai-txn-negative { color: var(--jzai-danger); font-weight: 700; }
.jzai-empty { color: var(--jzai-text-secondary); text-align: center; padding: 24px; }

/* =====================================
   Checkbox Group
   ===================================== */
.jzai-checkbox-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.jzai-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
}

/* =====================================
   Error & Login Prompt
   ===================================== */
.jzai-error {
    padding: 16px;
    background: #fee2e2;
    color: #b91c1c;
    border-radius: var(--jzai-radius-sm);
    text-align: center;
}
.jzai-success-message { color: var(--jzai-success); text-align: center; }
.jobzonwallah-ai-login-prompt {
    text-align: center;
    padding: 40px;
    background: var(--jzai-bg-alt);
    border: 1px solid var(--jzai-border);
    border-radius: var(--jzai-radius);
    color: var(--jzai-text-secondary);
    font-size: 18px;
}

/* =====================================
   Responsive
   ===================================== */
@media (max-width: 768px) {
    .jzai-resume { padding: 20px; }
    .jzai-field-row { grid-template-columns: 1fr; }
    .jzai-step-indicators { flex-wrap: wrap; }
    .jzai-step { font-size: 12px; padding: 6px 12px; }
    .jzai-template-grid { grid-template-columns: 1fr 1fr; }
    .jzai-ats-score-section { flex-direction: column; text-align: center; }
    .jzai-packs-grid { grid-template-columns: 1fr; }
    .jzai-filter-group { flex-direction: column; align-items: flex-start; }
    .jzai-bot-messages { height: 300px; }
}

/* =====================================
   Admin Styles
   ===================================== */
.jzai-admin-wrap { max-width: 1200px; }
.jzai-admin-wrap h1 { margin-bottom: 24px; }
.jzai-admin-tabs { margin-bottom: 20px; }
.jzai-admin-tab { padding: 10px 16px; cursor: pointer; border-radius: 4px 4px 0 0; display: inline-block; margin-right: 4px; background: #f0f0f1; }
.jzai-admin-tab.active { background: #fff; border: 1px solid #c3c4c7; border-bottom: 1px solid #fff; margin-bottom: -1px; }
.jzai-admin-tab-content { display: none; }
.jzai-admin-tab-content.active { display: block; }
.jzai-admin-section { background: #fff; padding: 24px; border: 1px solid #c3c4c7; margin-bottom: 20px; }
.jzai-admin-section h2 { margin-top: 0; }
.jzai-admin-packed-row { display: flex; gap: 12px; align-items: flex-end; margin-bottom: 8px; }