/* Mindfulness to Insight Practice Styles */

.mti-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Tabs */
.mti-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e5e7eb;
}

.mti-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.3s ease;
}

.mti-tab:hover {
    color: #3b82f6;
}

.mti-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

/* Tab Content */
.mti-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.mti-tab-content.active {
    display: block;
}

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

/* Timer Section */
.mti-timer-section {
    background: #f3f4f6;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.mti-timer-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

#timer-duration {
    width: 80px;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
}

#timer-display {
    font-size: 36px;
    font-weight: 300;
    color: #1f2937;
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

/* Capture Section */
.mti-capture-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .mti-capture-section {
        grid-template-columns: 1fr;
    }
}

.mti-capture-input h3,
.mti-thought-list h3 {
    margin-bottom: 15px;
    color: #1f2937;
}

#thought-input {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    resize: vertical;
    font-size: 16px;
    margin-bottom: 12px;
}

#thought-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Buttons */
.mti-btn-primary,
.mti-btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mti-btn-primary {
    background: #3b82f6;
    color: white;
}

.mti-btn-primary:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
}

.mti-btn-secondary {
    background: #6b7280;
    color: white;
}

.mti-btn-secondary:hover:not(:disabled) {
    background: #4b5563;
}

.mti-btn-primary:disabled,
.mti-btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Categories */
.mti-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 20px;
}

.mti-category {
    padding: 8px 12px;
    background: #e5e7eb;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.mti-category:hover {
    background: #d1d5db;
    transform: translateY(-1px);
}

/* Thought List */
.mti-thought-list {
    background: #f9fafb;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

#thoughts-container {
    flex-grow: 1;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
}

.mti-thought-item {
    display: flex;
    align-items: start;
    padding: 10px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.thought-number {
    font-weight: 500;
    color: #6b7280;
    margin-right: 10px;
    flex-shrink: 0;
}

.thought-text {
    flex-grow: 1;
    word-wrap: break-word;
}

.mti-delete-thought {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 10px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.mti-delete-thought:hover {
    opacity: 1;
}

.mti-actions {
    display: flex;
    gap: 10px;
}

.mti-actions button {
    flex: 1;
}

/* Process Section */
.mti-process-section {
    max-width: 800px;
    margin: 0 auto;
}

.mti-api-key-section {
    background: #f3f4f6;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

#api-key {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
}

.mti-help-text {
    font-size: 14px;
    color: #6b7280;
    margin-top: 8px;
}

#analysis-result {
    margin-top: 30px;
}

#analysis-content {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    line-height: 1.6;
    margin-bottom: 30px;
}

#analysis-content h1,
#analysis-content h2,
#analysis-content h3,
#analysis-content h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #1f2937;
}

#analysis-content ul,
#analysis-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.mti-followup-section {
    background: #f3f4f6;
    padding: 20px;
    border-radius: 8px;
}

#followup-question {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    resize: vertical;
}

/* History Section */
.mti-sessions-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.mti-session-card {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    position: relative;
    transition: all 0.2s ease;
}

.mti-session-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.session-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
    color: #6b7280;
}

.session-date {
    font-weight: 500;
}

.session-preview {
    color: #374151;
    line-height: 1.5;
    font-size: 14px;
}

.analyzed-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* Guide Section */
.mti-guide h3 {
    color: #1f2937;
    margin: 25px 0 15px;
}

.mti-guide h4 {
    color: #374151;
    margin: 20px 0 10px;
}

.mti-guide ol,
.mti-guide ul {
    margin-left: 20px;
    line-height: 1.8;
}

.mti-guide li {
    margin-bottom: 8px;
}

/* Notifications */
.mti-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
    max-width: 400px;
}

.mti-notification.show {
    transform: translateX(0);
}

.mti-notification.success {
    background: #10b981;
}

.mti-notification.error {
    background: #ef4444;
}

/* Scrollbar styling */
#thoughts-container::-webkit-scrollbar {
    width: 6px;
}

#thoughts-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#thoughts-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

#thoughts-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Login prompt */
.mti-login-prompt {
    text-align: center;
    padding: 40px;
    background: #f3f4f6;
    border-radius: 8px;
}

.mti-login-prompt a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.mti-login-prompt a:hover {
    text-decoration: underline;
}