/* SlimStop Audio Module */
.slimstop-audio {
    margin-bottom: 1.75rem;
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 16px;
    padding: 1.5rem;
    color: #e5e7eb;
}

.slimstop-audio h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.35rem;
    font-weight: 600;
}

.slimstop-audio-status {
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    background: #1f2937;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    color: #f9fafb;
}

.slimstop-audio-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.slimstop-audio .ssa-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 6.5rem;
    padding: 0.65rem 1.1rem;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    background: #3b82f6;
    color: #f9fafb;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.slimstop-audio .ssa-btn:hover:not(:disabled),
.slimstop-audio .ssa-btn:focus-visible:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px -12px rgba(59, 130, 246, 0.9);
}

.slimstop-audio .ssa-btn:disabled {
    background: #475569;
    color: rgba(226, 232, 240, 0.65);
    cursor: not-allowed;
    box-shadow: none;
}

.slimstop-audio .ssa-btn .ssa-label {
    display: inline-flex;
    align-items: center;
}

.slimstop-audio .ssa-btn.ssa-record {
    background: #ef4444;
}

.slimstop-audio .ssa-btn.ssa-record[data-recording="true"] {
    background: #f97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.25);
}

.slimstop-audio .ssa-btn.ssa-record[data-recording="true"] .ssa-icon {
    animation: ssa-record-pulse 1.2s ease-in-out infinite;
}

@keyframes ssa-record-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.18);
        opacity: 0.65;
    }
}

.slimstop-audio .ssa-btn.ssa-upload {
    background: #6366f1;
}

.slimstop-audio .ssa-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.slimstop-audio-note {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    color: #cbd5f5;
    text-align: center;
}

.slimstop-audio-note strong {
    color: #fbbf24;
}

.slimstop-audio-pending {
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 12px;
    padding: 1rem 1.15rem;
    margin-bottom: 1.25rem;
}

.slimstop-audio-pending h4 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    color: #e5e7eb;
}

.ssa-pending-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.ssa-pending-item {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 1rem;
    align-items: baseline;
    background: #0f172a;
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
}

.ssa-pending-name {
    font-weight: 600;
    color: #fbbf24;
}

.ssa-pending-meta {
    color: #94a3b8;
    font-size: 0.9rem;
}

.ssa-pending-status {
    color: #38bdf8;
    font-size: 0.9rem;
}

.slimstop-audio-segments {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 14px;
    overflow: hidden;
}

.slimstop-audio .ssa-dropdown {
    display: block;
    border-radius: inherit;
    background: transparent;
}

.slimstop-audio .ssa-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.1rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    color: #e5e7eb;
    outline: none;
}

.slimstop-audio .ssa-summary:focus-visible {
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.35);
    border-radius: inherit;
}

.slimstop-audio .ssa-summary-title {
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

.slimstop-audio .ssa-summary::-webkit-details-marker {
    display: none;
}

.slimstop-audio .ssa-summary::after {
    content: '\25BC';
    font-size: 0.85rem;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.slimstop-audio .ssa-dropdown[open] .ssa-summary::after {
    transform: rotate(180deg);
}

.slimstop-audio .ssa-dropdown-body {
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.slimstop-audio-segments h4 {
    margin: 0 0 0.85rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.slimstop-audio .ssa-empty {
    margin: 0;
    padding: 0.65rem 0;
    color: #94a3b8;
}

.slimstop-audio .ssa-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.slimstop-audio .ssa-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.slimstop-audio .ssa-item:hover {
    border-color: rgba(96, 165, 250, 0.35);
    transform: translateY(-1px);
}

.slimstop-audio .ssa-item-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.92rem;
    color: #cbd5f5;
}

.slimstop-audio .ssa-item-meta strong {
    font-size: 1.05rem;
    color: #fb923c;
}

.slimstop-audio .ssa-item-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.slimstop-audio .ssa-item-actions .ssa-link {
    color: #60a5fa;
    font-weight: 600;
    text-decoration: none;
}

.slimstop-audio .ssa-item-actions .ssa-link:hover {
    text-decoration: underline;
}

.slimstop-audio .ssa-item-actions .ssa-delete {
    border: 1px solid rgba(248, 113, 113, 0.75);
    background: rgba(248, 113, 113, 0.12);
    color: #fca5a5;
    border-radius: 8px;
    padding: 0.45rem 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.16s ease;
}

.slimstop-audio .ssa-item-actions .ssa-delete:hover,
.slimstop-audio .ssa-item-actions .ssa-delete:focus-visible {
    background: rgba(248, 113, 113, 0.25);
    transform: translateY(-1px);
}

.slimstop-audio .ssa-item-actions .ssa-delete:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 720px) {
    .slimstop-audio {
        padding: 1.1rem;
    }

    .slimstop-audio-actions {
        gap: 0.5rem;
    }

    .slimstop-audio .ssa-btn {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: auto;
        justify-content: center;
        padding: 0.6rem 0.75rem;
    }

    .slimstop-audio .ssa-item {
        flex-direction: column;
        align-items: stretch;
    }

    .slimstop-audio .ssa-item-actions {
        justify-content: flex-end;
    }
}

@media (max-width: 450px) {
    .slimstop-audio-actions {
        gap: 0.4rem;
    }

    .slimstop-audio .ssa-btn {
        flex: 1 1 100%;
    }

    .slimstop-audio .ssa-item-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.55rem;
    }

    .slimstop-audio .ssa-item-actions .ssa-delete {
        width: 100%;
        text-align: center;
    }
}
