/* Meeting Tool - custom styles on top of Pico.css */

:root {
    --pico-primary: #e63946;
    --accent: #e63946;
    --bg-dark: #1a1a2e;
    --bg-card: #16213e;
}

body {
    background: var(--bg-dark);
    min-height: 100vh;
}

h1 {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Recorder Section */
.recorder-section {
    padding: 2rem 0;
    text-align: center;
}

.title-input {
    max-width: 400px;
    margin: 0 auto 1rem;
}

.meeting-details {
    max-width: 400px;
    margin: 0 auto 1rem;
    text-align: left;
}

.meeting-details summary {
    cursor: pointer;
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    text-align: center;
}

.details-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.details-grid input, .details-grid select {
    margin-bottom: 0;
}

.button-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.record-btn {
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem;
    border-radius: 2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.record-btn .icon {
    font-size: 1.3rem;
}

.record-btn.hidden {
    display: none;
}

/* Recording active */
.recording-active {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.recording-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 2rem;
    font-variant-numeric: tabular-nums;
}

.pulse {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

#visualizer {
    border-radius: 8px;
    background: rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.stop-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-size: 1.2rem;
    cursor: pointer;
}

.stop-btn:hover {
    background: #c62f3b;
}

/* Processing */
.processing {
    text-align: center;
    padding: 2rem;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

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

/* Error */
.error-box {
    background: rgba(230, 57, 70, 0.15);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

/* Meetings Section */
.meetings-section {
    padding: 1rem 0 3rem;
}

.muted {
    color: rgba(255,255,255,0.5);
    text-align: center;
}

.meeting-card {
    cursor: pointer;
    transition: transform 0.1s;
    margin-bottom: 0.5rem;
}

.meeting-card:hover {
    transform: translateX(4px);
}

.meeting-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.meeting-header {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.meeting-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-done { background: #2d6a4f; color: #b7e4c7; }
.status-review { background: #1a5f8a; color: #c7e4ff; }
.status-recording { background: #9d0208; color: #ffccd5; }
.status-processing, .status-transcribing { background: #e85d04; color: #ffecd2; }
.status-error { background: #6a040f; color: #ffccd5; }

.transcript-view {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.transcript-view pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.9rem;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: 8px;
}

.transcript-view footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.small {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .button-row {
        flex-direction: column;
        align-items: stretch;
    }

    .recording-indicator {
        font-size: 1.5rem;
    }

    .meeting-card header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Source selector — card-style radio buttons */
.source-selector {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    max-width: 520px;
    margin: 1.2rem auto 1.4rem;
    text-align: left;
}

.source-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.18s ease;
    position: relative;
}

.source-card:hover:not(.disabled) {
    border-color: rgba(230, 57, 70, 0.5);
    background: rgba(230, 57, 70, 0.06);
    transform: translateY(-1px);
}

.source-card.selected {
    border-color: var(--accent);
    background: rgba(230, 57, 70, 0.12);
    box-shadow: 0 4px 20px rgba(230, 57, 70, 0.15);
}

.source-card.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.source-card input[type="radio"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--accent);
}

.source-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    width: 2.4rem;
    text-align: center;
    line-height: 1;
}

.source-content {
    flex: 1;
    min-width: 0;
}

.source-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: rgba(255, 255, 255, 0.95);
}

.source-desc {
    font-size: 0.85rem;
    opacity: 0.65;
    line-height: 1.4;
}

/* Hint box shown when combined mode is selected */
.combined-hint {
    max-width: 520px;
    margin: 0 auto 1.3rem;
    padding: 1rem 1.2rem;
    background: rgba(100, 180, 255, 0.08);
    border-left: 3px solid #64b4ff;
    border-radius: 8px;
    text-align: left;
    font-size: 0.88rem;
    line-height: 1.5;
}

.combined-hint strong {
    color: #64b4ff;
}

.combined-hint ol {
    margin: 0.5rem 0 0 0;
    padding-left: 1.3rem;
}

.combined-hint li {
    margin-bottom: 0.25rem;
}

/* Big primary action button */
.primary-big {
    display: block;
    width: 100%;
    max-width: 520px;
    margin: 0.5rem auto 0;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: var(--accent);
    border: none;
    color: white;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.primary-big:hover {
    background: #d62838;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(230, 57, 70, 0.3);
}

.primary-big .icon {
    margin-right: 0.4rem;
}

/* Review actions (shown when transcript is waiting for approval) */
.review-actions {
    margin: 1rem 0;
    padding: 1rem 1.2rem;
    background: rgba(100, 180, 255, 0.07);
    border: 1px solid rgba(100, 180, 255, 0.2);
    border-radius: 10px;
}

.review-hint {
    margin: 0 0 0.7rem 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.review-buttons {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.btn-approve,
.btn-discard {
    padding: 0.65rem 1.1rem;
    border-radius: 8px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    flex: 1;
    min-width: 180px;
}

.btn-approve {
    background: #2d6a4f;
    color: #d1f5dc;
}

.btn-approve:hover {
    background: #35805e;
    transform: translateY(-1px);
}

.btn-discard {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
}

.btn-discard:hover {
    background: rgba(255, 100, 100, 0.15);
    color: #ffb3b3;
}
