/* ============================================
   Honest Fit Assessment Modal Styles
   ============================================ */

:root {
    --fit-success: #10b981;
    --fit-warning: #f59e0b;
    --fit-info: #3b82f6;
    --fit-bg-success: #ecfdf5;
    --fit-bg-warning: #fffbeb;
    --fit-bg-info: #eff6ff;
    --fit-overlay: rgba(0, 0, 0, 0.75);
    --fit-border-radius: 12px;
    --fit-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ============================================
   Modal Base
   ============================================ */

.fit-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.fit-modal[hidden] {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fit-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--fit-overlay);
    backdrop-filter: blur(4px);
}

.fit-modal-content {
    position: relative;
    background: white;
    border-radius: var(--fit-border-radius);
    box-shadow: var(--fit-shadow);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================
   Modal Header
   ============================================ */

.fit-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.fit-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.fit-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.fit-modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

/* ============================================
   Modal Body
   ============================================ */

.fit-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* ============================================
   Input Section
   ============================================ */

.fit-input-section {
    margin-bottom: 24px;
}

.fit-input-section label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.fit-input-section textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.2s;
}

.fit-input-section textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.fit-char-count {
    text-align: right;
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.btn-analyze {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
}

.btn-analyze:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(102, 126, 234, 0.4);
}

.btn-analyze:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   Loading State
   ============================================ */

.fit-loading {
    text-align: center;
    padding: 60px 20px;
}

.fit-loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

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

.fit-loading p {
    color: #6b7280;
    font-size: 16px;
}

/* ============================================
   Results Section
   ============================================ */

.fit-results {
    animation: fadeIn 0.5s ease;
}

/* Score Card */
.fit-score-card {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 12px;
    margin-bottom: 24px;
}

.fit-score-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.fit-score-value {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fit-score-card h3 {
    margin: 0;
    font-size: 18px;
    color: #374151;
}

/* Sections */
.fit-section {
    margin-bottom: 24px;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid transparent;
}

.fit-section h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fit-strong {
    background: var(--fit-bg-success);
    border-color: var(--fit-success);
}

.fit-strong h3 {
    color: #065f46;
}

.fit-development {
    background: var(--fit-bg-warning);
    border-color: var(--fit-warning);
}

.fit-development h3 {
    color: #92400e;
}

.fit-recommendations {
    background: var(--fit-bg-info);
    border-color: var(--fit-info);
}

.fit-recommendations h3 {
    color: #1e40af;
}

/* Lists */
.fit-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.fit-list li {
    padding: 12px;
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #111827;
    position: relative;
    padding-left: 36px;
}

.fit-list li::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.fit-strong .fit-list li::before {
    background: var(--fit-success);
}

.fit-development .fit-list li::before {
    background: var(--fit-warning);
}

.fit-recommendations .fit-list li::before {
    background: var(--fit-info);
}

.fit-summary {
    padding: 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    font-style: italic;
}

/* Actions */
.fit-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-copy {
    flex: 1;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.btn-secondary {
    flex: 1;
    padding: 12px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.fit-remaining {
    margin-top: 16px;
    text-align: center;
    font-size: 12px;
    color: #6b7280;
}

/* ============================================
   Error State
   ============================================ */

.fit-error {
    text-align: center;
    padding: 40px 20px;
}

.error-message {
    color: #dc2626;
    font-size: 16px;
    margin-bottom: 16px;
}

.btn-retry {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-retry:hover {
    background: #5568d3;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .fit-modal {
        padding: 10px;
    }

    .fit-modal-content {
        max-height: 95vh;
    }

    .fit-modal-header {
        padding: 16px;
    }

    .fit-modal-header h2 {
        font-size: 20px;
    }

    .fit-modal-body {
        padding: 16px;
    }

    .fit-score-circle {
        width: 100px;
        height: 100px;
    }

    .fit-score-value {
        font-size: 28px;
    }

    .fit-actions {
        flex-direction: column;
    }

    .fit-section {
        padding: 16px;
    }

    .fit-list li {
        font-size: 13px;
        padding: 10px 10px 10px 32px;
    }
}

@media (max-width: 480px) {
    .fit-modal-header h2 {
        font-size: 18px;
    }

    .btn-analyze {
        font-size: 14px;
        padding: 12px;
    }
}
