/* Sentio – Brand Styles */

/* Color Palette */
:root {
    --sentio-primary: #4f46e5;     /* Indigo 600 */
    --sentio-primary-dark: #3730a3; /* Indigo 800 */
    --sentio-accent: #f59e0b;       /* Amber 500 */
    --sentio-bg: #f9fafb;           /* Gray 50 */
    --sentio-card: #ffffff;
    --sentio-text: #111827;         /* Gray 900 */
    --sentio-muted: #6b7280;        /* Gray 500 */
    --sentio-border: #e5e7eb;       /* Gray 200 */
}

/* Topic Grid Tiles */
.topic-tile {
    transition: all 0.15s ease;
    cursor: pointer;
    user-select: none;
}

.topic-tile:hover {
    transform: scale(1.03);
}

.topic-tile.selected {
    border-color: var(--sentio-primary);
    background-color: #eef2ff; /* Indigo 50 */
    box-shadow: 0 0 0 2px var(--sentio-primary);
}

/* Slider Styling */
.opinion-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #ef4444, #f59e0b, #22c55e);
    outline: none;
}

.opinion-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--sentio-primary);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.opinion-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--sentio-primary);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* Post Card */
.post-card {
    background: var(--sentio-card);
    border: 1px solid var(--sentio-border);
    border-radius: 12px;
    transition: box-shadow 0.15s ease;
}

.post-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Vote Buttons */
.vote-btn {
    transition: all 0.15s ease;
}

.vote-btn:hover {
    transform: scale(1.1);
}

.vote-btn.voted-up {
    color: #22c55e;
}

.vote-btn.voted-down {
    color: #ef4444;
}

/* Fade-in Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.3s ease forwards;
}

/* ========================================================================
   BOTTOM-SHEET MODAL (Mobile slide-up, Desktop centered)
   ======================================================================== */

/* Mobile: bottom-sheet */
.modal-sheet-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 100%;
    overflow: visible;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.modal-sheet-wrapper.modal-sheet-open {
    transform: translateY(0);
}

/* Desktop: centered overlay */
@media (min-width: 640px) {
    .modal-sheet-wrapper {
        position: static;
        transform: none;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100%;
        overflow: visible;
        transition: none;
    }
    .modal-sheet-wrapper.modal-sheet-open {
        transform: none;
    }
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========================================================================
   ONBOARDING v2 – Platform-basiert
   ======================================================================== */

/* Platform Selection Tiles */
.platform-tile {
    transition: all 0.15s ease;
    cursor: pointer;
    user-select: none;
    border: 2px solid var(--sentio-border);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    background: var(--sentio-card);
}

.platform-tile:hover {
    transform: scale(1.02);
    border-color: #c7d2fe; /* Indigo 200 */
}

.platform-tile.selected {
    border-color: var(--sentio-primary);
    background-color: #eef2ff; /* Indigo 50 */
    box-shadow: 0 0 0 2px var(--sentio-primary);
}

.platform-tile .platform-emoji {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    display: block;
}

.platform-tile .platform-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--sentio-text);
}

.platform-tile .platform-desc {
    font-size: 0.75rem;
    color: var(--sentio-muted);
    margin-top: 0.25rem;
}

/* Smooth Progress Bar */
.onboarding-progress {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    width: 100%;
}

.onboarding-progress-fill {
    height: 100%;
    background: var(--sentio-primary);
    transition: width 0.4s ease;
    border-radius: 2px;
}

/* Voice Recording */
.voice-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid var(--sentio-border);
    background: var(--sentio-card);
    color: var(--sentio-muted);
}

.voice-btn:hover {
    border-color: var(--sentio-primary);
    color: var(--sentio-primary);
}

.voice-btn.recording {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
    animation: recording-pulse 1.5s ease-in-out infinite;
}

@keyframes recording-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
}

/* Recording Timer */
.recording-timer {
    font-variant-numeric: tabular-nums;
    font-size: 0.875rem;
    color: #ef4444;
    font-weight: 600;
}

/* Reddit Preview Card */
.reddit-preview {
    background: #fafafa;
    border: 1px solid var(--sentio-border);
    border-radius: 8px;
    padding: 1rem;
}

.reddit-preview .karma-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--sentio-muted);
}

/* Skip Button */
.skip-btn {
    color: var(--sentio-muted);
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.15s;
}

.skip-btn:hover {
    color: var(--sentio-text);
}

/* Generating Animation */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.generating-spinner {
    animation: spin-slow 2s linear infinite;
}

/* Step Transition */
.step-enter {
    animation: fadeInUp 0.3s ease forwards;
}

/* ========================================================================
   PROFILE EDITING
   ======================================================================== */

/* Editable Field Wrapper */
.editable-field {
    cursor: pointer;
    position: relative;
    padding: 4px 6px;
    margin: -4px -6px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.editable-field:hover {
    background: #f9fafb;
}

.edit-icon {
    opacity: 0;
    transition: opacity 0.15s ease;
    color: var(--sentio-muted);
    flex-shrink: 0;
}

.editable-field:hover .edit-icon {
    opacity: 0.5;
}

/* Editable Tags (Beliefs + Interests) */
.tag-editable {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding-right: 6px;
    transition: all 0.15s ease;
}

.tag-editable:hover {
    padding-right: 2px;
}

.tag-delete {
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease;
    font-size: 0.7rem;
    line-height: 1;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.tag-editable:hover .tag-delete {
    opacity: 0.6;
}

.tag-delete:hover {
    opacity: 1 !important;
    background: #fef2f2;
    color: #ef4444;
}

/* Add Tag Button */
.tag-add {
    cursor: pointer;
    border: 2px dashed #d1d5db;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    font-size: 1rem;
    line-height: 1;
}

.tag-add:hover {
    border-color: var(--sentio-primary);
    color: var(--sentio-primary);
    background: #eef2ff;
}

/* Save indicator */
.save-flash {
    animation: saveFlash 0.6s ease forwards;
}

@keyframes saveFlash {
    0% { background-color: #ecfdf5; }
    100% { background-color: transparent; }
}
