/* Component-specific styles */

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Checkbox and Radio Groups */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"],
.checkbox-group input[type="radio"] {
    width: auto;
    margin: 0;
}

/* Range Sliders */
input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

/* Upload Area */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #dee2e6;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.6;
}

.upload-area h3 {
    color: #495057;
    margin-bottom: 10px;
}

.upload-area p {
    color: #6c757d;
    margin-bottom: 20px;
}

/* Processing Section */
.processing-section {
    text-align: center;
    padding: 40px 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

/* Results Section */
.results-section {
    margin-top: 30px;
}

.extraction-summary {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.extraction-summary p {
    margin-bottom: 8px;
}

.extraction-summary strong {
    color: #495057;
}

.confidence-high { color: #28a745; }
.confidence-medium { color: #ffc107; }
.confidence-low { color: #dc3545; }

.data-type-aggregated { 
    color: #17a2b8; 
    font-weight: 600;
}

.extracted-data {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    margin-bottom: 20px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-buttons .btn-primary,
.action-buttons .btn-secondary {
    flex: 1;
    min-width: 140px;
}

/* Info Boxes */
.info-box {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.info-box h5 {
    color: #0c5460;
    margin-bottom: 8px;
}

.info-box p {
    color: #0c5460;
    margin-bottom: 8px;
}

/* Format Cards */
.sample-formats {
    margin-top: 40px;
}

.format-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.format-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

.format-card h4 {
    color: #495057;
    margin-bottom: 15px;
}

.format-card ul {
    list-style: none;
    padding: 0;
}

.format-card li {
    padding: 5px 0;
    color: #6c757d;
    position: relative;
    padding-left: 20px;
}

.format-card li:before {
    content: "✓";
    color: #28a745;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Image Upload */
.image-upload-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.image-preview {
    width: 80px;
    height: 80px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    text-align: center;
    color: #6c757d;
}

.image-placeholder span {
    font-size: 24px;
    display: block;
    margin-bottom: 5px;
}

.image-placeholder p {
    font-size: 12px;
    margin: 0;
}

.image-upload-btn {
    padding: 8px 16px;
    font-size: 12px;
}

/* Response Items */
.survey-responses {
    margin-top: 30px;
}

.response-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.response-item-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.response-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.response-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.response-image-placeholder {
    width: 100%;
    height: 100%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #6c757d;
}

.response-summary {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn-primary,
    .action-buttons .btn-secondary {
        min-width: auto;
    }
    
    .format-examples {
        grid-template-columns: 1fr;
    }
    
    .image-upload-container {
        flex-direction: column;
        align-items: flex-start;
    }
}/* Pe
rsona Card Styles */
.persona-card {
    background: #fefefe;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    min-height: 500px;
}

.persona-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.persona-front, .persona-back {
    padding: 20px;
    min-height: 460px;
}

.persona-back {
    display: none;
    background: #f8f9fa;
}

.persona-card.flipped .persona-front {
    display: none;
}

.persona-card.flipped .persona-back {
    display: block;
}

.persona-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.persona-image:hover {
    border-color: #667eea;
}

.persona-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.persona-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: #f8f9fa;
    color: #6c757d;
}

.persona-title-section {
    text-align: center;
    margin-bottom: 20px;
}

.persona-title-section h3 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 1.4rem;
}

.persona-age-range {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

.persona-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
}

.persona-actions .btn-secondary {
    padding: 6px 12px;
    font-size: 12px;
    flex: 1;
}

.persona-section {
    margin-bottom: 20px;
}

.persona-section h4 {
    color: #495057;
    font-size: 1rem;
    margin: 0 0 8px 0;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 4px;
}

.persona-section p {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.persona-quote {
    font-style: italic;
    color: #495057 !important;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.persona-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.persona-list li {
    color: #6c757d;
    font-size: 0.9rem;
    padding: 4px 0;
    position: relative;
    padding-left: 16px;
}

.persona-list li:before {
    content: "•";
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.persona-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.stat {
    font-size: 0.8rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 12px;
}

/* Persona Back Side */
.persona-back-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.persona-back-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.persona-data {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    max-height: 350px;
    overflow-y: auto;
}

.persona-data pre {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.3;
    margin: 0;
    color: #495057;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Story Cards */
.stories-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stories-header h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.stories-header p {
    margin: 0;
    color: #6c757d;
}

.persona-stories-section {
    margin-bottom: 40px;
}

.persona-stories-title {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.story-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.story-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.story-card.priority-high {
    border-left: 4px solid #dc3545;
}

.story-card.priority-medium {
    border-left: 4px solid #ffc107;
}

.story-card.priority-low {
    border-left: 4px solid #28a745;
}

.story-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.story-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
    flex: 1;
}

.story-priority {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.story-priority.high {
    background: #f8d7da;
    color: #721c24;
}

.story-priority.medium {
    background: #fff3cd;
    color: #856404;
}

.story-priority.low {
    background: #d4edda;
    color: #155724;
}

.story-content p {
    margin: 8px 0;
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.4;
}

.story-content strong {
    color: #2c3e50;
}

.story-criteria {
    margin: 15px 0;
}

.story-criteria h5 {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 0.9rem;
}

.story-criteria ul {
    margin: 0;
    padding-left: 20px;
}

.story-criteria li {
    color: #6c757d;
    font-size: 0.85rem;
    margin: 4px 0;
}

.story-meta {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.story-meta small {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Editable text styles */
.editable-text {
    cursor: pointer;
    transition: background-color 0.2s ease;
    padding: 2px 4px;
    border-radius: 3px;
}

.editable-text:hover {
    background-color: #f8f9fa;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .personas-container {
        grid-template-columns: 1fr;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
    }
    
    .persona-actions {
        flex-direction: column;
    }
    
    .persona-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .story-header {
        flex-direction: column;
        gap: 10px;
    }
}/* P
ersona Statistics View */
.persona-stats-view {
    padding: 20px;
    min-height: 460px;
    background: #f8f9fa;
}

.persona-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.persona-stats-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.persona-stats-content {
    max-height: 380px;
    overflow-y: auto;
}

/* Stats Overview */
.stats-overview {
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-card h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin: 10px 0;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-percentage {
    font-size: 1.2rem;
    font-weight: 600;
    color: #28a745;
}

/* Questions Statistics */
.stats-questions {
    margin-bottom: 25px;
}

.stats-questions h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.question-stat {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 10px;
}

.question-header h5 {
    margin: 0;
    color: #2c3e50;
    font-size: 0.95rem;
    line-height: 1.3;
    flex: 1;
}

.confidence-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.confidence-high {
    background: #d4edda;
    color: #155724;
}

.confidence-medium {
    background: #fff3cd;
    color: #856404;
}

.confidence-low {
    background: #f8d7da;
    color: #721c24;
}

.question-details {
    margin-top: 10px;
}

.most-common-answer {
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.most-common-answer strong {
    color: #495057;
}

.answer-count {
    color: #6c757d;
    font-size: 0.85rem;
    margin-left: 8px;
}

.answer-distribution h6 {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 0.85rem;
    font-weight: 600;
}

.distribution-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.distribution-bar {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.answer-text {
    color: #495057;
    font-weight: 500;
}

.answer-stats {
    color: #6c757d;
}

.bar-container {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Respondents List */
.stats-respondents h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.respondents-list {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.respondent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.respondent-item:last-child {
    border-bottom: none;
}

.respondent-name {
    color: #495057;
    font-size: 0.9rem;
}

.respondent-number {
    color: #6c757d;
    font-size: 0.8rem;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .confidence-badge {
        align-self: flex-end;
    }
    
    .bar-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}/* Stats 
Modal */
.stats-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.stats-modal-content {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stats-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.stats-modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.stats-modal-content .stats-overview,
.stats-modal-content .stats-questions,
.stats-modal-content .stats-respondents {
    padding: 20px;
}

.stats-modal-content .stats-questions,
.stats-modal-content .stats-respondents {
    max-height: 60vh;
    overflow-y: auto;
}

/* Responsive modal */
@media (max-width: 768px) {
    .stats-modal {
        padding: 10px;
    }
    
    .stats-modal-content {
        max-height: 95vh;
    }
    
    .stats-modal-header {
        padding: 15px;
    }
    
    .stats-modal-header h3 {
        font-size: 1.1rem;
    }
    
    .stats-overview,
    .stats-questions,
    .stats-respondents {
        padding: 15px !important;
    }
}