/* ============================================
   BUTTONS.CSS - Button Styles
   ============================================ */

button {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: inherit;
}

button:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

button:disabled:hover {
    transform: none;
    box-shadow: none;
}

[role="button"] {
    cursor: pointer;
}

button:focus-visible,
[role="button"]:focus-visible,
a:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

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

.btn-danger:hover {
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

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

.btn-success:hover {
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

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

/* Icon Buttons */
.btn-icon {
    padding: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Directory Card Favorite - Match Live Cards Exactly */
.dj-card .btn-icon,
.venue-card .btn-icon {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.dj-card .btn-icon:hover,
.venue-card .btn-icon:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
    border-color: var(--warning);
    color: white;
}

.dj-card .btn-icon.btn-icon--active,
.venue-card .btn-icon.btn-icon--active,
.dj-card .btn-icon--active,
.venue-card .btn-icon--active {
    background: rgba(245, 158, 11, 0.3) !important;
    border-color: var(--warning) !important;
    color: #fbbf24 !important;
    box-shadow: none !important;
}

.dj-card .btn-icon.btn-icon--active:hover,
.venue-card .btn-icon.btn-icon--active:hover {
    background: rgba(245, 158, 11, 0.5) !important;
    border-color: #fbbf24 !important;
    color: #fbbf24 !important;
}

/* Ghost Button (header nav) */
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: inherit;
    text-decoration: none;
}

.btn-ghost:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--text-secondary);
    box-shadow: none;
    transform: none;
}

/* Discord button - keep brand color */
.btn-ghost[href*="discord.gg"] {
    color: #5865F2;
    border-color: rgba(88, 101, 242, 0.3);
}

.btn-ghost[href*="discord.gg"]:hover {
    background: rgba(88, 101, 242, 0.1);
    border-color: #5865F2;
    color: #5865F2;
}

/* ============================================
   DIRECTORY TOGGLE BUTTONS (All/DJs/Venues)
   ============================================ */

.btn-toggle-group {
    display: flex;
    gap: 4px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.btn-toggle {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    /* KEY FIX: Prevent emoji/text from wrapping */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    flex-wrap: nowrap;
}

.btn-toggle:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-toggle.active {
    background: var(--secondary);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.toggle-count {
    font-size: 11px;
    opacity: 0.8;
}

/* Individual preference toggles (ON/OFF style) */
.settings-section > div > .btn-toggle {
    padding: 8px 20px;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    min-width: 60px;
}

.settings-section > div > .btn-toggle:hover {
    border-color: var(--secondary);
    color: var(--text-primary);
}

.settings-section > div > .btn-toggle.active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

/* Settings section cards */
.settings-section {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.settings-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.toggle-switch:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.toggle-switch.active {
    background: var(--secondary);
    border-color: var(--secondary);
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(24px);
}

/* Small button modifier — compact size for inline action bars */
.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
}

.btn-add-venue-inline {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: var(--success);
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    line-height: 1;
    transition: all 0.2s ease;
}

.btn-add-venue-inline:hover {
    background: var(--success-hover);
    transform: scale(1.1);
}