/* CV Editor Styles */

.cv-editor-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Tab Styles */
.tab-button {
    transition: all 0.2s ease;
    cursor: pointer;
    background: none;
    border: none;
    outline: none;
}

.tab-button:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.tab-button.active {
    color: var(--brand-primary);
    border-bottom-color: var(--brand-primary) !important;
}

.tab-panel {
    min-height: 400px;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-strong);
    margin-bottom: 0.5rem;
}

.form-label-sm {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 0.375rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text);
    background-color: var(--color-surface);
    transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--brand-primary);
    ring: 2px;
    ring-color: rgba(35, 35, 35, 0.2);
    box-shadow: 0 0 0 3px rgba(35, 35, 35, 0.1);
}

.form-input-sm,
.form-textarea-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 0.375rem;
}

.form-textarea {
    resize: vertical;
    font-family: inherit;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

/* Structured Editor Sections */
.editor-section {
    background-color: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background-color: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    display: flex;
    align-items: center;
}

.section-content {
    padding: 1.25rem;
}

/* Button Icon */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    background-color: var(--brand-primary);
    color: var(--brand-on-primary);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background-color: var(--brand-primary-600);
    transform: scale(1.05);
}

.btn-icon:active {
    transform: scale(0.95);
}

/* Skills List */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-item {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background-color: #EEF2FF;
    border: 1px solid #C7D2FE;
    color: #4338CA;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.skill-item:hover {
    background-color: #E0E7FF;
}

.skill-text {
    line-height: 1;
}

.skill-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    border: none;
    background-color: transparent;
    color: #6366F1;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.skill-remove:hover {
    background-color: rgba(99, 102, 241, 0.1);
    color: #4338CA;
}

/* Experience/Education Items */
.experience-item {
    padding: 1rem;
    background-color: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.experience-item:hover {
    border-color: #D1D5DB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* File Upload Area */
#fileUploadArea {
    transition: all 0.2s ease;
}

#fileUploadArea:hover {
    border-color: var(--brand-primary);
    background-color: rgba(16, 185, 129, 0.02);
}

/* Character Count */
#charCount {
    font-variant-numeric: tabular-nums;
}

/* Responsive Grid Utilities */
@media (max-width: 768px) {
    .cv-editor-container {
        padding: 0 0.5rem;
    }

    .section-header {
        padding: 0.75rem 1rem;
    }

    .section-content {
        padding: 1rem;
    }

    .form-input,
    .form-textarea,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Loading States */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: 50%;
    left: 50%;
    margin-left: -0.5rem;
    margin-top: -0.5rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Drag and Drop States */
.drag-over {
    border-color: #10B981 !important;
    background-color: rgba(16, 185, 129, 0.05) !important;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Transitions */
.transition-all {
    transition: all 0.2s ease;
}

/* Focus visible for accessibility */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .cv-editor-container {
        max-width: 100%;
    }

    .section-header button,
    .skill-remove,
    .experience-item button {
        display: none;
    }

    .tab-button {
        display: none;
    }
}

/* Utility classes */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Industry items - similar to skills */
#industriesList .skill-item {
    background-color: #FEF3C7;
    border-color: #FCD34D;
    color: #92400E;
}

#industriesList .skill-item:hover {
    background-color: #FDE68A;
}

#industriesList .skill-remove {
    color: #D97706;
}

#industriesList .skill-remove:hover {
    background-color: rgba(217, 119, 6, 0.1);
    color: #92400E;
}

/* Key strengths styling */
#strengthsList .flex {
    transition: all 0.2s ease;
}

#strengthsList .flex:hover {
    background-color: #F3F4F6;
}

#strengthsList input {
    font-size: 0.875rem;
}

/* Success/Info boxes */
.alert-success {
    background-color: #D1FAE5;
    border-color: var(--brand-primary);
    color: #065F46;
}

.alert-info {
    background-color: #DBEAFE;
    border-color: #3B82F6;
    color: #1E40AF;
}

.alert-warning {
    background-color: #FEF3C7;
    border-color: #F59E0B;
    color: #92400E;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}
