/**
 * Button Components - UNIFIED BUTTON SYSTEM
 * All button styling consolidated here - following Aksho Animation Style
 * 
 * Aksho Animation Style Rules:
 * - Normal state: Purple gradient rgba(139, 92, 246, 0.6) to rgba(168, 85, 247, 0.5)
 * - Hover state: Orange background #ff7b47
 * - Transition: background 0.15s ease
 * - NO transform/translateY/scale on hover (no bobbing/jumping)
 */

/* ============================================================================
   BASE BUTTON STYLES
   ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    color: #374151;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.2);
}

.btn:active {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================================
   BUTTON VARIANTS
   ============================================================================ */

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    transition: background 0.15s ease;
}

.btn-primary:hover {
    background: #ff7b47;
}

.btn-primary:active {
    background: linear-gradient(135deg, #6b46c1, #7c3aed);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border: 2px solid #e5e7eb;
    transition: background 0.15s ease;
}

.btn-secondary:hover {
    background: #ff7b47;
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.6) 0%, rgba(168, 85, 247, 0.5) 100%);
    color: #191970;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
    transition: background 0.15s ease;
}

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

.btn-danger {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.6) 0%, rgba(168, 85, 247, 0.5) 100%);
    color: #191970;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
    transition: background 0.15s ease;
}

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

/* ============================================================================
   SPECIAL ACTION BUTTONS (COPY, CLEAR, etc.)
   ============================================================================ */

.copy-btn, .clear-btn {
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    width: 85px;
    text-align: center;
    box-sizing: border-box;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.6) 0%, rgba(168, 85, 247, 0.5) 100%);
    color: #191970;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
    transition: background 0.15s ease;
    cursor: pointer;
}

.copy-btn:hover,
.clear-btn:hover {
    background: #ff7b47;
}

.copy-btn:active,
.clear-btn:active {
    background: #ff7b47;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Special states with !important to override any external conflicts */
.prompt-btn.copied-state {
    background: #ff7b47 !important;
    color: #191970 !important;
}

.prompt-btn.cleared-state {
    background: #ff7b47 !important;
    color: #191970 !important;
}

/* ============================================================================
   FORM BUTTONS
   ============================================================================ */

/* Preferences button in section headers */
.settings-button-integrated {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.6) 0%, rgba(168, 85, 247, 0.5) 100%) !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    color: #191970 !important;
    padding: 2px 4px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s ease;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3) !important;
    margin-left: 12px;
    margin-top: -8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    line-height: 1;
}

.settings-button-integrated:hover {
    background: #ff7b47 !important;
}

/* General preferences button */
.settings-button {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.6) 0%, rgba(168, 85, 247, 0.5) 100%);
    color: #191970;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.settings-button:hover {
    background: #ff7b47;
}

/* Form tag clear button (small X button) */
.form-clear-btn {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.6) 0%, rgba(168, 85, 247, 0.5) 100%);
    color: #191970;
    border: 1px solid rgba(139, 92, 246, 0.3);
    font-size: 8px;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 3px;
    margin-right: 6px;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-block;
    position: relative;
    top: -2px;
    vertical-align: baseline;
    transition: background 0.15s ease;
    min-width: 30px;
    text-align: center;
    box-sizing: border-box;
}

.form-clear-btn:hover {
    background: #ff7b47;
}

/* ============================================================================
   TOGGLE BUTTONS
   ============================================================================ */

.toggle-btn {
    background: white;
    color: #191970;
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
    min-width: fit-content;
    text-align: center;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(139, 92, 246, 0.4);
}

.toggle-btn:active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.8) 0%, rgba(168, 85, 247, 0.7) 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-btn.active {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
    border-color: #7c3aed;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

.toggle-btn:focus {
    outline: 2px solid #4facfe;
    outline-offset: 2px;
}

/* Special toggle states */
.toggle-btn.undesired {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.2);
}

.toggle-btn.undesired:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.3);
}

/* ============================================================================
   CONTENT CONTROL BUTTONS
   ============================================================================ */

/* Content rating toggles */
.content-toggle {
    padding: 8px 16px;
    border: 2px solid;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.content-toggle.sfw-mode {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-color: #059669;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.content-toggle.nsfw-mode {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-color: #dc2626;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.content-toggle:hover {
    background: #ff7b47;
}

/* Optional content toggles */
.optional-toggle {
    padding: 8px 16px;
    border: 2px solid;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.optional-toggle.hide-optional {
    background: linear-gradient(135deg, #2d1b69, #191970);
    color: white;
    border-color: #2d1b69;
    box-shadow: 0 2px 8px rgba(45, 27, 105, 0.3);
}

.optional-toggle.show-optional {
    background: linear-gradient(135deg, #4a2c7a, #252056);
    color: white;
    border-color: #4a2c7a;
    box-shadow: 0 2px 8px rgba(74, 44, 122, 0.3);
}

.optional-toggle:hover {
    background: #ff7b47;
}

/* Subcategory toggles */
.subcategory-toggle {
    padding: 8px 16px;
    border: 2px solid;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.subcategory-toggle.subcategory-on {
    background: linear-gradient(135deg, #2d1b69, #191970);
    color: white;
    border-color: #2d1b69;
    box-shadow: 0 2px 8px rgba(45, 27, 105, 0.3);
}

.subcategory-toggle.subcategory-off {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    border-color: #6b7280;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}

.subcategory-toggle:hover {
    background: #ff7b47;
}

/* ============================================================================
   PROMPT BUTTONS
   ============================================================================ */

.prompt-btn {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.6) 0%, rgba(168, 85, 247, 0.5) 100%);
    color: white;
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    width: 85px;
    text-align: center;
    box-sizing: border-box;
    cursor: pointer;
    transition: background 0.15s ease;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.prompt-btn:hover {
    background: #ff7b47;
    color: #191970;
}

.prompt-btn:active {
    background: #ff7b47;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Special prompt button states */
.prompt-btn.clicked-state {
    background: linear-gradient(135deg, #6b46c1, #7c3aed) !important;
    color: white !important;
    box-shadow: 0 0 15px rgba(107, 70, 193, 0.6) !important;
}

.prompt-btn.success-state {
    background: linear-gradient(135deg, #059669, #10b981) !important;
    color: white !important;
}

.prompt-btn.cleared-state {
    background: #ff7b47 !important;
    color: #191970 !important;
}

/* ============================================================================
   SPECIAL UTILITY BUTTONS
   ============================================================================ */

/* SIS Access Button */
.sis-access-btn {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.6) 0%, rgba(168, 85, 247, 0.5) 100%);
    color: #191970;
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.sis-access-btn:hover {
    background: #ff7b47;
}

.sis-access-btn:active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.8) 0%, rgba(168, 85, 247, 0.7) 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.6) 0%, rgba(168, 85, 247, 0.5) 100%);
    color: #191970;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.3s ease;
    z-index: 1000;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    opacity: 0;
    visibility: hidden;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: #ff7b47;
}

.scroll-to-top:active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.8) 0%, rgba(168, 85, 247, 0.7) 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Version badge (clickable) - Inverted Aksho Animation (orange normal, purple hover) */
.version-badge {
    background: #ff7b47;
    color: #191970 !important;
    border: 1px solid rgba(255, 123, 71, 0.4);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(255, 123, 71, 0.3);
}

.version-badge:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.6) 0%, rgba(168, 85, 247, 0.5) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: white !important;
}

/* Modal close buttons moved to version-modal.css */

/* ============================================================================
   BUTTON GROUPS & LAYOUT
   ============================================================================ */

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-group .btn {
    flex: 1;
    min-width: max-content;
}

.output-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

/* ============================================================================
   BUTTON SIZES
   ============================================================================ */

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .output-buttons {
        justify-content: center;
    }
}