/**
 * Global CSS Variables - Deal Management Plugin
 * Adapted from User Account Hub Plugin
 */

:root {
    /* ========================================
	   Spacing & Sizing
	   ======================================== */

    /* Spacing */
    --dm-spacing-xs: 0.125rem;
    --dm-spacing-s: 0.25rem;
    --dm-spacing-m: 0.5rem;
    --dm-spacing-l: 1rem;
    --dm-spacing-xl: 1.5rem;
    --dm-spacing-xxl: 2rem;
    --dm-spacing-huge: 4rem;
    --dm-spacing-extreme: 6rem;
    --dm-spacing-huge-minus: -4rem;

    /* Border Radius */
    --dm-radius-s: 0.2rem;
    --dm-radius-m: 0.4rem;
    --dm-radius-l: 1.2rem;
    --dm-radius-xl: 4rem;
    --dm-radius-full: 100%;

    /* Component Dimensions */
    --dm-toggle-width: 48px;
    --dm-toggle-height: 24px;
    --dm-toggle-slider-size: 18px;
    --dm-toggle-slider-offset: 3px;
    --dm-toggle-slider-travel: 24px;

    /* Loading Spinner */
    --dm-spinner-size: 48px;
    --dm-spinner-border-width: 4px;

    /* Deal Card */
    --dm-card-image-height: 200px;
    --dm-card-image-height-mobile: 160px;
    --dm-card-padding: 1.5rem;
    --dm-card-padding-mobile: 1rem;

    /* Badge */
    --dm-badge-size: 60px;
    --dm-badge-offset: 10px;

    /* ========================================
	   Typography
	   ======================================== */

    /* Font Family */
    --dm-font-comma-base: comma-base;

    /* Font Size */
    --dm-font-size-xxs: 0.6rem;
    --dm-font-size-xs: 0.7rem;
    --dm-font-size-s: 0.8rem;
    --dm-font-size-m: 0.9rem;
    --dm-font-size-base: 1rem;
    --dm-font-size-l: 1.2rem;
    --dm-font-size-xl: 1.4rem;
    --dm-font-size-xxl: 1.8rem;
    --dm-font-size-xxxl: 4rem;

    /* Font Weights */
    --dm-font-weight-light: 300;
    --dm-font-weight-normal: 400;
    --dm-font-weight-semibold: 600;
    --dm-font-weight-black: 800;

    /* Line Heights */
    --dm-line-height-tight: 1;
    --dm-line-height-s: 1.2;
    --dm-line-height-normal: 1.5;
    --dm-line-height-relaxed: 1.6;

    /* ========================================
	   Colors
	   ======================================== */

    /* Primary Colors */
    --dm-color-primary: #2ed131;
    --dm-color-secondary: #ff7c38;
    --dm-color-heading: #222222;
    --dm-color-text: #353531;
    --dm-color-faded: #6a6a6a;
    --dm-color-gray: #9c9c9c;

    /* Alternative Colors */
    --dm-alt-color-heading: #ffffff;
    --dm-alt-color-text: #ffffff;

    /* Background Colors */
    --dm-color-bg: #ffffff;
    --dm-color-bg-alt: #f5f5f5;
    --dm-alt-color-bg: #000000;
    --dm-alt-color-bg-alt: #222222;

    /* Border Colors */
    --dm-color-border: #e9e9e9;
    --dm-alt-color-border: #b4b4b4;

    /* Stars */
    --dm-color-star: #fbbf24;

    /* State Colors */
    --dm-color-success: #10b981;
    --dm-color-error: #991b1b;
    --dm-color-info: #ff7c38;
    --dm-color-warning: #f59e0b;
    --dm-color-white: #ffffff;

    /* Deal Status Colors */
    --dm-color-draft: #6b7280;
    --dm-color-pending: #f59e0b;
    --dm-color-active: #10b981;
    --dm-color-paused: #6366f1;
    --dm-color-rejected: #dc2626;
    --dm-color-expired: #9ca3af;

    /* Vote Colors */
    --dm-color-upvote: #10b981;
    --dm-color-downvote: #ef4444;

    /* Vendor States */
    --dm-color-free: #95a5a6;
    --dm-color-premium: #3498db;
    --dm-color-business: #dd8800;
    --dm-bg-free: #ecf0f1;
    --dm-bg-premium: #ebf5fb;
    --dm-bg-business: #fff2df;

    /* Featured */
    --dm-color-featured: #fbbf24;

    /* Overlay Colors */
    --dm-color-overlay: rgba(255, 255, 255, 0.85);
    --dm-color-overlay-dark: rgba(0, 0, 0, 0.7);
    --dm-color-tooltip-bg: #222222;
    --dm-color-tooltip-text: #ffffff;

    /* ========================================
	   Shadows
	   ======================================== */

    --dm-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --dm-shadow-md: 0 2px 6px rgba(0, 0, 0, 0.25);
    --dm-shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.15);
    --dm-shadow-xl: 0 4px 12px rgba(0, 0, 0, 0.25);
    --dm-shadow-2xl: 0 4px 12px rgba(0, 0, 0, 0.3);
    --dm-shadow-badge: 0 2px 10px rgba(0, 0, 0, 0.4);

    /* ========================================
	   Transitions
	   ======================================== */

    --dm-transition-fast: 0.2s ease;
    --dm-transition-normal: 0.3s ease;
    --dm-transition-slow: 0.4s ease;
    --dm-transition-spin: 0.8s linear infinite;

    /* ========================================
	   Z-Index Layers
	   ======================================== */

    --dm-z-badge: 2;
    --dm-z-discount-badge: 10;
    --dm-z-overlay: 1000;
    --dm-z-tooltip: 1000;
    --dm-z-modal: 9999;
    --dm-z-modal-content: 10000;
    --dm-z-toast: 100002;
    --dm-z-popup-content: 100000;

    /* ========================================
	   Filters & Effects
	   ======================================== */

    --dm-blur-overlay: blur(2px);

    /* ========================================
	   Responsive Breakpoints (for reference)
	   ======================================== */

    /* Mobile: 479px and below */
    /* Tablet: 600px and below */
    /* Small Desktop: 767px and below */
    /* Desktop: 1140px and below */
}

/* ========================================
   Toast Notification Styles
   ======================================== */

/* Keyframe Animations */
@keyframes dm-toast-slide-in {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes dm-toast-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.dm-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--dm-z-toast);
    max-width: 400px;
}

.dm-toast {
    background: var(--dm-color-white);
    border-radius: var(--dm-radius-m);
    box-shadow: var(--dm-shadow-xl);
    padding: var(--dm-spacing-m);
    margin-bottom: var(--dm-spacing-m);
    display: none;
    align-items: center;
    justify-content: space-between;
    animation: dm-toast-slide-in 0.3s ease-out forwards;
}

.dm-toast.hiding {
    animation: dm-toast-slide-out 0.3s ease-in forwards;
}

.dm-toast:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

.dm-toast-content {
    display: flex;
    align-items: center;
    gap: var(--dm-spacing-m);
}

.dm-toast-icon {
    font-size: var(--dm-font-size-xl);
}

.dm-toast-message {
    font-size: var(--dm-font-size-xs);
    color: var(--dm-color-text);
    line-height: var(--dm-line-height-normal);
}

.dm-toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--dm-spacing-s);
    opacity: 0.5;
    transition: var(--dm-transition-fast);
}

.dm-toast-close:hover {
    opacity: 1;
}

/* Toast Types */
.dm-toast-success {
    border-left: 4px solid var(--dm-color-success);
}

.dm-toast-success .dm-toast-icon {
    color: var(--dm-color-success);
}

.dm-toast-error {
    border-left: 4px solid var(--dm-color-error);
}

.dm-toast-error .dm-toast-icon {
    color: var(--dm-color-error);
}

.dm-toast-info {
    border-left: 4px solid var(--dm-color-info);
}

.dm-toast-info .dm-toast-icon {
    color: var(--dm-color-info);
}

.dm-toast-warning {
    border-left: 4px solid var(--dm-color-warning);
}

.dm-toast-warning .dm-toast-icon {
    color: var(--dm-color-warning);
}

/* Responsive */
@media (max-width: 479px) {
    .dm-toast-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .dm-toast {
        padding: var(--dm-spacing-m);
    }
}