/**
 * ThinkCloudly Job Prep Assistant Styles
 * All CSS for the wizard, login, feedback, and UI components
 */

/* ========== RESET & BASE ========== */
.job-prep-wizard * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ========== MAIN CONTAINER ========== */
.job-prep-wizard {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

/* ========== SSO LOGIN CONTAINER ========== */
.sso-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 24px;
    padding: 50px 40px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-header {
    text-align: center;
}

.login-header h2 {
    color: #1a202c;
    font-size: 2rem;
    margin-bottom: 10px;
}

.login-header p {
    color: #718096;
    font-size: 1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #2d3748;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input {
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #4a5568;
}

.remember-me input {
    cursor: pointer;
    accent-color: #667eea;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102,126,234,0.4);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-error {
    background: #fed7d7;
    color: #c53030;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
}

/* ========== USER INFO BAR ========== */
.user-info-bar {
    max-width: 1100px;
    margin: 0 auto 20px;
    background: white;
    padding: 15px 25px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.user-welcome {
    color: #2d3748;
    font-size: 1rem;
}

.logout-btn {
    background: #667ee9 !important;
    color: white !important;
    border: none;
    padding: 8px 20px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #e53e3e !important;
    transform: translateY(-2px);
}

/* ========== PROGRESS BAR ========== */
.wizard-progress {
    max-width: 600px;
    margin: 0 auto 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
    cursor: pointer;
}

.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.progress-step.active .step-circle {
    background: white;
    color: #667eea;
    transform: scale(1.1);
}

.progress-step.completed .step-circle {
    background: #10b981;
    color: white;
}

.step-label {
    color: rgba(255,255,255,0.8);
    font-size: 0.8rem;
    font-weight: 600;
}

.progress-step.active .step-label {
    color: white;
}

.progress-line {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.3);
    margin: 0 0px;
    margin-top: -32px;
}

/* ========== WIZARD STEPS ========== */
.wizard-step {
    display: none;
    animation: fadeIn 0.5s;
}

.wizard-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-content {
    max-width: 1100px;
    margin: auto;
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.step-header {
    text-align: center;
    margin-bottom: 15px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.875rem;
    margin-bottom: 20px;
}

.step-header h1,
.step-header h2 {
    color: #1a202c;
    font-size: 1.5rem;
}

.subtitle {
    color: #718096;
    font-size: 1rem;
}

/* ========== INPUT CONTAINER ========== */
.input-container {
    position: relative;
    margin-bottom: 30px;
}

.input-container textarea {
    width: 100%;
    padding: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s;
}

.input-container textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.char-count {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 0.75rem;
    color: #a0aec0;
    background: white;
    padding: 4px 8px;
    border-radius: 6px;
}

/* ========== BUTTONS ========== */
.wizard-btn {
    border: 1px solid #bfbbbb !important;
    border-radius: 12px !important;
    padding: 12px 11px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
}

.wizard-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    justify-content: center;
}

.wizard-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102,126,234,0.4);
}

.wizard-btn.secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.wizard-btn.secondary:hover {
    background: #edf2f7;
}

.btn-arrow {
    transition: transform 0.3s;
}

.wizard-btn:hover .btn-arrow {
    transform: translateX(4px);
}

.wizard-nav {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}

.wizard-nav .wizard-btn {
    flex: 1;
}

/* ========== TAGS SECTION ========== */
.tags-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.action-btn {
    background: #f7fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s;
    color: black !important;
}

.action-btn:hover {
    background: #edf2f7 !important;
}

.selected-count {
    margin-left: auto;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-size: 0.95rem;
}

.tags-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 20px;
    row-gap: 10px;
    margin-bottom: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.tag-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1px 15px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer !important;
    transition: all 0.3s;
    font-size: 14px !important;
}

.tag-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.tag-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.tag-label {
    flex: 1;
    font-weight: 500;
    color: #2d3748;
}

.tag-checkmark {
    color: #667eea;
    font-size: 1.25rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.tag-checkbox:checked ~ .tag-checkmark {
    opacity: 1;
}

.tag-item:has(.tag-checkbox:checked) {
    background: rgba(102,126,234,0.1);
    border-color: #667eea;
}

/* ========== CONTENT LAYOUT ========== */
.content-layout {
    display: flex;
    height: calc(100vh - 200px);
    min-height: 600px;
}

.categories-sidebar {
    width: 220px;
    background: #f7fafc;
    padding: 20px 15px;
    overflow-y: auto;
    border-right: 1px solid #e2e8f0;
}

.sidebar-header {
    margin-bottom: 24px;
}

.sidebar-header h3 {
    color: #1a202c;
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.sidebar-header p {
    color: #718096;
    font-size: 0.875rem;
}

.percentage-calculation {
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    border-radius: 16px;
    padding: 25px;
    margin: 20px 0;
    border: 2px solid #e2e8f0;
}

.calc-step {
    font-size: 1.1rem;
    color: #4a5568;
    margin: 12px 0;
    font-weight: 500;
}

.calc-step strong {
    color: #667eea;
    font-size: 1.2rem;
}

.final-percentage {
    display: inline-flex;
    gap: 10px;
    padding: 8px;
    border-radius: 7px;
    border: 1px solid #100c0c14;
}

.final-percentage-label {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 10px;
    opacity: 0.9;
}

.categories-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 0px;
    padding: 7px 7px;
    background: white;
    border-radius: 10px;
    text-decoration: none !important;
    color: #2d3748 !important;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.category-link:hover,
.category-link.active {
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
    border-color: #667eea;
    transform: translateX(4px);
}

.cat-icon {
    font-size: 1.5rem;
    display: none;
}

.cat-name {
    flex: 1;
    font-weight: 600;
    font-size: 13px;
}

.cat-count {
    color: #7156b0;
    font-size: 0.7rem;
    font-weight: 700;
    margin: 3px;
}

.category-link.active {
    background: linear-gradient(135deg, rgba(102,126,234,0.2), rgba(118,75,162,0.2)) !important;
    border-color: #667eea !important;
    transform: translateX(4px);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(102,126,234,0.2);
}

.category-link.active .cat-name {
    color: #667eea;
}

.category-link.active .cat-count {
    color: #667eea;
    font-weight: 800;
}

.content-main {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: white;
}

.selected-skills {
    display: none;
    background: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.selected-skills strong {
    display: block;
    color: #1a202c;
    margin-bottom: 12px;
}

#selectedSkillsTags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* ========== CONTENT CARDS ========== */
.content-category {
    margin-bottom: 50px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.category-header h3 {
    flex: 1;
    color: #1a202c;
    font-size: 1.75rem;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.content-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.card-thumb {
    width: 240px !important;
    height: auto;
}

.card-thumb img {
    width: 100%;
    height: 100%;
}

.card-title {
    padding: 16px 16px 8px;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.4;
    text-align: center;
    min-height: 60px;
    font-size: 14px;
}

/* ========== FEEDBACK ========== */
.feedback-col {
    margin-top: 20px;
}

.feedback-btn {
    background: white;
    border-radius: 15px;
    padding: 10px;
    margin: 5px;
    margin-bottom: 95px;
    position: absolute;
    bottom: 41px;
    cursor: pointer;
    color: #6b7471;
}

.feedback-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.feedback-popup.show {
    display: flex;
}

.feedback-popup-content {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: fadeInUp 0.35s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback-popup-content h2 {
    margin-bottom: 10px;
    color: #1a202c;
    text-align: center;
}

.feedback-popup-content p {
    margin-bottom: 15px;
    color: #4a5568;
    text-align: center;
}

#feedbackMessage {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    resize: vertical;
    font-size: 1rem;
}

.feedback-actions {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.feedback-submit-btn,
.feedback-cancel-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px !important;
    font-weight: 600;
    cursor: pointer;
}

.feedback-submit-btn {
    background: #667eea !important;
    color: white !important;
    border: none !important;
}

.feedback-submit-btn:hover {
    background: #5a67d8 !important;
}

.feedback-cancel-btn {
    background: #edf2f7;
    border: 2px solid #e2e8f0;
    color: #4a5568;
}

.feedback-cancel-btn:hover {
    background: #e2e8f0;
}

/* ========== LOADING OVERLAY ========== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.magic-spinner {
    position: relative;
    width: 60px;
    height: 60px;
}

.spinner-ring {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: white;
}

.spinner-ring:nth-child(2) {
    border-right-color: white;
    width: 48px;
    height: 48px;
    top: 6px;
    left: 6px;
    animation-delay: 0.2s;
}

.spinner-ring:nth-child(3) {
    border-bottom-color: white;
    width: 36px;
    height: 36px;
    top: 12px;
    left: 12px;
    animation-delay: 0.4s;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loadingText {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

/* ========== NOTIFICATION ========== */
.notification {
    position: fixed;
    top: 20px;
    right: -400px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    transition: right 0.3s;
    font-weight: 600;
}

.notification.show {
    right: 20px;
}

.notification.warning {
    background: #fed7aa;
    color: #9a3412;
}

.notification.error {
    background: #fecaca;
    color: #dc2626;
}

/* ========== FOOTER ========== */
.footer {
    max-width: 1100px;
    margin: auto;
    background: white;
    margin-top: 20px;
    text-align: center;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .content-layout {
        flex-direction: column;
        height: auto;
    }
    
    .categories-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .categories-nav {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .category-link {
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .job-prep-wizard {
        padding: 10px;
    }
    
    .login-card {
        padding: 40px 30px;
    }
    
    .login-header h2 {
        font-size: 1.75rem;
    }
    
    .wizard-progress {
        margin-bottom: 20px;
    }
    
    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .step-content {
        padding: 24px 20px;
    }
    
    .step-header h1,
    .step-header h2 {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .tags-grid {
        grid-template-columns: 1fr;
        max-height: 300px;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .wizard-nav {
        flex-direction: column;
    }
}