/**
 * Button Components
 * All button styles and variants
 */

/* Base Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    box-sizing: border-box;
}

a.btn {
    text-decoration: none;
}

a.btn:hover,
a.btn:focus,
a.btn:active {
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Button Color Variants */
.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Button Size Variants */
.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-xs {
    padding: 4px 12px;
    font-size: 12px;
}

.btn-compact {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-toolbar {
    padding: 10px 18px;
    font-size: 14px;
    white-space: nowrap;
    min-height: 40px;
}

.btn-header {
    padding: 10px 18px;
    font-size: 14px;
    white-space: nowrap;
    min-height: 40px;
}

.btn-page-action {
    padding: 8px 16px;
    font-size: 14px;
    white-space: nowrap;
}

.btn-font-control {
    padding: 6px 12px;
    font-size: 18px;
    line-height: 1;
}

/* Button States */
.btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Button Group */
.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Specific Purpose Buttons */
.btn-kick {
    padding: 6px 12px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-kick:hover {
    background: #dc2626;
    transform: none;
    box-shadow: none;
}

.btn-join-listener {
    display: inline-block;
    padding: 8px 16px;
    background: #3b82f6;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-join-listener:hover {
    background: #2563eb;
    text-decoration: none;
}

.btn-download-transcript {
    display: inline-block;
    padding: 8px 16px;
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-download-transcript:hover {
    background: #d97706;
}

.btn-close-room {
    display: inline-block;
    padding: 8px 16px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-close-room:hover {
    background: #dc2626;
}

.btn-kick-listener {
    padding: 4px 8px;
    font-size: 14px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    color: var(--danger-color);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-kick-listener:hover {
    background: #fecaca;
}

/* Download Buttons Container */
.download-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.download-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    background: var(--surface);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: all 0.2s;
}

.download-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.delete-btn {
    padding: 6px 12px;
    border: 1px solid var(--danger-color);
    border-radius: 8px;
    font-size: 13px;
    background: var(--surface);
    color: var(--danger-color);
    cursor: pointer;
    transition: all 0.2s;
}

.delete-btn:hover {
    background: var(--danger-color);
    color: white;
}

/* Action Buttons Container */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .download-buttons {
        flex-direction: column;
    }

    .download-btn {
        width: 100%;
    }
}
