/* ==================== Buttons ==================== */

/* Spinning animation for loading states */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.generate-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.generate-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.generate-btn:disabled,
.generate-btn.loading,
.generate-btn.disabled {
    background: linear-gradient(135deg, #c9b8f0 0%, #b8a6e8 100%) !important;
    color: rgba(255, 255, 255, 0.7);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    border-radius: 24px;
}

/* Secondary style for Regenerate button */
.btn-secondary.generate-btn {
    background: var(--panel-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.btn-secondary.generate-btn:hover {
    background: var(--hover-bg);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.generate-btn-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-size: 14px;
}

.generate-btn-purple:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.generate-btn-purple:disabled,
.generate-btn-purple.loading {
    background: linear-gradient(135deg, #b4adc4 0%, #9d98ab 100%) !important;
    color: #e5e3eb;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.tool-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.tool-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ==================== Form Elements ==================== */

.selector-wrapper {
    position: relative;
}

.toolbar-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
}

/* ==================== Toast Notification (Bubble Style) ==================== */

.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    background: white;
    border-radius: 20px;
    padding: 18px 24px;
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 320px;
    max-width: 420px;

    /* Enhanced animations */
    transform: translateX(400px) scale(0.9);
    opacity: 0;
    transition:
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.3s ease-out,
        box-shadow 0.3s ease;

    z-index: 2000;

    /* Subtle gradient overlay */
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);

    /* Frosted glass effect (light) */
    backdrop-filter: blur(10px);
}

.toast.show {
    transform: translateX(0) scale(1);
    opacity: 1;
}

/* Hover effect - subtle glow */
.toast:hover {
    box-shadow:
        0 24px 30px -6px rgba(0, 0, 0, 0.15),
        0 12px 12px -6px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Success Toast */
.toast.success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid rgba(50, 215, 75, 0.2);
}

.toast.success:hover {
    box-shadow:
        0 24px 30px -6px rgba(50, 215, 75, 0.2),
        0 12px 12px -6px rgba(50, 215, 75, 0.1),
        0 0 0 1px rgba(50, 215, 75, 0.3);
}

/* Error Toast */
.toast.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.toast.error:hover {
    box-shadow:
        0 24px 30px -6px rgba(255, 59, 48, 0.2),
        0 12px 12px -6px rgba(255, 59, 48, 0.1),
        0 0 0 1px rgba(255, 59, 48, 0.3);
}

/* Warning Toast */
.toast.warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid rgba(255, 149, 0, 0.2);
}

.toast.warning:hover {
    box-shadow:
        0 24px 30px -6px rgba(255, 149, 0, 0.2),
        0 12px 12px -6px rgba(255, 149, 0, 0.1),
        0 0 0 1px rgba(255, 149, 0, 0.3);
}

/* Info Toast */
.toast.info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid rgba(0, 122, 255, 0.2);
}

.toast.info:hover {
    box-shadow:
        0 24px 30px -6px rgba(0, 122, 255, 0.2),
        0 12px 12px -6px rgba(0, 122, 255, 0.1),
        0 0 0 1px rgba(0, 122, 255, 0.3);
}

/* Toast Icon */
.toast-icon {
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Toast Content */
.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 3px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    opacity: 0.85;
}

/* Close Button */
.toast-close {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    line-height: 1;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

.toast-close:active {
    transform: scale(0.95);
}

/* ==================== Voice Dropdown ==================== */

.voice-select-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    min-width: 140px;
    transition: all 0.2s;
}

.voice-select-trigger:hover {
    border-color: var(--primary-color);
}

.voice-avatar-xs {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background-color: #e0e7ff;
    background-size: cover;
}

.voice-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 100;
    margin-top: 8px;
    display: none;
}

.voice-dropdown.active {
    display: block;
}

.voice-dropdown-search {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.voice-dropdown-search input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}

.voice-dropdown-list {
    max-height: 300px;
    overflow-y: auto;
}

.voice-option {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 2px 4px;
    position: relative;
}

.voice-option:hover {
    background: var(--panel-bg);
    transform: translateX(2px);
}

.voice-option.selected {
    background: #e0e7ff;
    font-weight: 600;
}

.voice-option.selected::before {
    content: '✓';
    position: absolute;
    right: 12px;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 16px;
}
