﻿/**
 * ACTION COMPONENTS
 * =================
 * 
 * Header Actions, Status Toast, and Interactive Buttons
 * Theme-aware action components with proper state management
 */

/* Header Actions */
.header-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.header-action-btn {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.1);
    border: 2px solid rgba(var(--primary-rgb), 0.2);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

    .header-action-btn:hover {
        background: rgba(var(--primary-rgb), 0.2);
        border-color: var(--primary);
        transform: scale(1.1);
        box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
    }

    .header-action-btn:focus {
        outline: 3px solid rgba(var(--primary-rgb), 0.3);
        outline-offset: 2px;
    }

    .header-action-btn:active {
        transform: scale(0.95);
    }

    /* Active States - Theme-Aware */
    .header-action-btn.active {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
        box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.4);
    }

    .header-action-btn.processing {
        pointer-events: none;
        opacity: 0.7;
        animation: pulse 1.5s ease-in-out infinite;
    }

    /* Success State - Theme-Aware */
    .header-action-btn.success {
        background: var(--primary);
        border-color: var(--primary);
        color: white;
    }

        .header-action-btn.success:hover {
            background: var(--primary-dark);
            border-color: var(--primary-dark);
        }

    /* Error State */
    .header-action-btn.error {
        background: #ef4444;
        border-color: #ef4444;
        color: white;
    }

        .header-action-btn.error:hover {
            background: #dc2626;
            border-color: #dc2626;
        }

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* Bottom Actions Section */
.bottom-actions {
    margin: 2rem 0;
    padding: 0 1rem;
}

.bottom-actions-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.8) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 4px solid var(--primary);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

    .bottom-actions-content:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    }

.bottom-actions-title {
    margin-bottom: 1rem;
}

    .bottom-actions-title span {
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-secondary);
        text-transform: uppercase;
        letter-spacing: 0.1em;
    }

/* Status Toast Notification */
.status-toast {
    position: fixed;
    top: 6rem;
    right: 1rem;
    z-index: 1100;
    background: white;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-left: 4px solid var(--primary);
    backdrop-filter: blur(10px);
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 300px;
    min-width: 200px;
}

    .status-toast.show {
        transform: translateX(0);
    }

    .status-toast.success {
        border-left-color: #22c55e;
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(255, 255, 255, 0.98));
    }

    .status-toast.error {
        border-left-color: #ef4444;
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(255, 255, 255, 0.98));
    }

.status-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-icon {
    flex-shrink: 0;
}

    .status-icon .success-icon {
        color: #22c55e;
    }

    .status-icon .error-icon {
        color: #ef4444;
    }

#status-message {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    line-height: 1.4;
}

/* Theme variations for actions */
body.theme-nature .bottom-actions-content {
    border-left-color: #4caf50;
}

body.theme-nature .status-toast:not(.success):not(.error) {
    border-left-color: #4caf50;
}

body.theme-sky .bottom-actions-content {
    border-left-color: #2196f3;
}

body.theme-sky .status-toast:not(.success):not(.error) {
    border-left-color: #2196f3;
}

body.theme-sunset .bottom-actions-content {
    border-left-color: #ff7043;
}

body.theme-sunset .status-toast:not(.success):not(.error) {
    border-left-color: #ff7043;
}

body.theme-mystical .bottom-actions-content {
    border-left-color: #7e57c2;
}

body.theme-mystical .status-toast:not(.success):not(.error) {
    border-left-color: #7e57c2;
}

/* Clickable Cards and Interactive Elements */
.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border-radius: 1rem;
    overflow: hidden;
}

    .card-link:hover {
        transform: translateY(-2px);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }

    .card-link:focus {
        outline: 3px solid var(--primary);
        outline-offset: 2px;
        transform: translateY(-2px);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }

    .card-link:focus-visible {
        outline: 3px solid var(--primary);
        outline-offset: 2px;
    }

    .card-link:active {
        transform: translateY(0);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

.card-button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 1rem;
    font-family: inherit;
    font-size: inherit;
}

    .card-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }

    .card-button:focus {
        outline: 3px solid var(--primary);
        outline-offset: 2px;
        transform: translateY(-2px);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }

    .card-button:focus-visible {
        outline: 3px solid var(--primary);
        outline-offset: 2px;
    }

    .card-button:active {
        transform: translateY(0);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

.card-loading {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
