/*
 * SfwBot Shared Utility Classes
 * Version: 2.0
 * Aligned with STYLE_GUIDE.md v2.0
 *
 * This file contains reusable utility classes for:
 * - Buttons (gradient variants)
 * - Icon containers
 * - Section headers
 * - Grid layouts
 * - Loading states
 * - Empty states
 * - Spacing utilities
 */

/* ============================================
   BUTTON UTILITIES
   ============================================ */

/* Primary Gradient Button - Standard Size */
.btn-gradient-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-gradient-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
    color: white;
}

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

/* Large CTA Button */
.btn-gradient-lg {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    padding: 1.25rem 2.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    border: none;
    text-decoration: none;
}

.btn-gradient-lg:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.5);
    color: white;
}

@media (max-width: 767px) {
    .btn-gradient-lg {
        padding: 1rem 2rem;
    }
}

/* Small Button */
.btn-gradient-sm {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: white;
    border: none;
    text-decoration: none;
}

.btn-gradient-sm:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    color: white;
}

/* Outline Gradient Button */
.btn-gradient-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(99, 102, 241, 0.4);
    color: white;
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-gradient-outline:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.7);
    color: white;
}

/* Success Gradient Button */
.btn-gradient-success {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 20px rgba(74, 222, 128, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-gradient-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(74, 222, 128, 0.4);
    color: white;
}

/* Danger Gradient Button */
.btn-gradient-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-gradient-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.4);
    color: white;
}

/* Warning Gradient Button */
.btn-gradient-warning {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-gradient-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.4);
    color: white;
}

/* ============================================
   ICON CONTAINER UTILITIES
   ============================================ */

/* Base icon container styles */
.icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

/* Icon Container Sizes */
.icon-container-hero {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    font-size: 2rem;
}

.icon-container-lg {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    font-size: 1.75rem;
}

.icon-container-md {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    font-size: 1.5rem;
}

.icon-container-sm {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 1.125rem;
}

.icon-container-xs {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 0.875rem;
}

/* Responsive Icon Sizes */
@media (max-width: 991px) {
    .icon-container-hero {
        width: 64px;
        height: 64px;
        font-size: 1.75rem;
    }

    .icon-container-lg {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
}

@media (max-width: 767px) {
    .icon-container-hero {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }

    .icon-container-lg {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }

    .icon-container-md {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }
}

/* Icon Background Gradients */
.icon-gradient-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.icon-gradient-success {
    background: linear-gradient(135deg, #4ade80, #22c55e);
}

.icon-gradient-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.icon-gradient-warning {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.icon-gradient-info {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

.icon-gradient-pink {
    background: linear-gradient(135deg, #ec4899, #f43f5e);
}

.icon-gradient-purple {
    background: linear-gradient(135deg, #a855f7, #8b5cf6);
}

/* ============================================
   SECTION HEADER UTILITIES
   ============================================ */

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-header.text-start,
.section-header.text-left {
    text-align: left;
}

.section-header.text-end,
.section-header.text-right {
    text-align: right;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.section-title i {
    margin-right: 0.75rem;
    color: #6366f1;
}

.section-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.section-header.text-start .section-subtitle,
.section-header.text-left .section-subtitle {
    margin-left: 0;
}

.section-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-top: 0.75rem;
}

/* Responsive Section Headers */
@media (max-width: 767px) {
    .section-header {
        margin-bottom: 1.5rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }
}

/* ============================================
   SECTION SPACING UTILITIES
   ============================================ */

.section-padding {
    padding: 6rem 0;
}

.section-padding-sm {
    padding: 4rem 0;
}

.section-padding-xs {
    padding: 3rem 0;
}

@media (max-width: 767px) {
    .section-padding {
        padding: 4rem 0;
    }

    .section-padding-sm {
        padding: 3rem 0;
    }

    .section-padding-xs {
        padding: 2rem 0;
    }
}

/* ============================================
   GRID LAYOUT UTILITIES
   ============================================ */

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 767px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

@media (max-width: 767px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Modules Grid */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 991px) {
    .modules-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

/* Two Column Grid */
.two-column-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 767px) {
    .two-column-grid {
        grid-template-columns: 1fr;
    }
}

/* Three Column Grid */
.three-column-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 991px) {
    .three-column-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .three-column-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   LOADING STATE UTILITIES
   ============================================ */

/* Loading Spinner */
.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner-sm {
    width: 2rem;
    height: 2rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top: 2px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner-lg {
    width: 4rem;
    height: 4rem;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 39, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 100;
}

.loading-message {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9375rem;
    margin-top: 1rem;
}

/* ============================================
   EMPTY STATE UTILITIES
   ============================================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
}

.empty-message {
    font-size: 1.125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.empty-submessage {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.5);
}

.error-state i {
    color: #ef4444;
}

@media (max-width: 767px) {
    .empty-state {
        padding: 3rem 1.5rem;
    }

    .empty-state i {
        font-size: 2.5rem;
    }

    .empty-message {
        font-size: 1rem;
    }
}

/* ============================================
   SPACING UTILITIES
   ============================================ */

/* Margin Bottom Utilities */
.mb-025 { margin-bottom: 0.25rem !important; }
.mb-05 { margin-bottom: 0.5rem !important; }
.mb-075 { margin-bottom: 0.75rem !important; }
.mb-1 { margin-bottom: 1rem !important; }
.mb-125 { margin-bottom: 1.25rem !important; }
.mb-15 { margin-bottom: 1.5rem !important; }
.mb-2 { margin-bottom: 2rem !important; }
.mb-25 { margin-bottom: 2.5rem !important; }
.mb-3 { margin-bottom: 3rem !important; }
.mb-4 { margin-bottom: 4rem !important; }
.mb-6 { margin-bottom: 6rem !important; }

/* Margin Top Utilities */
.mt-025 { margin-top: 0.25rem !important; }
.mt-05 { margin-top: 0.5rem !important; }
.mt-075 { margin-top: 0.75rem !important; }
.mt-1 { margin-top: 1rem !important; }
.mt-125 { margin-top: 1.25rem !important; }
.mt-15 { margin-top: 1.5rem !important; }
.mt-2 { margin-top: 2rem !important; }
.mt-25 { margin-top: 2.5rem !important; }
.mt-3 { margin-top: 3rem !important; }
.mt-4 { margin-top: 4rem !important; }
.mt-6 { margin-top: 6rem !important; }

/* Gap Utilities */
.gap-025 { gap: 0.25rem !important; }
.gap-05 { gap: 0.5rem !important; }
.gap-075 { gap: 0.75rem !important; }
.gap-1 { gap: 1rem !important; }
.gap-125 { gap: 1.25rem !important; }
.gap-15 { gap: 1.5rem !important; }
.gap-2 { gap: 2rem !important; }
.gap-25 { gap: 2.5rem !important; }
.gap-3 { gap: 3rem !important; }

/* ============================================
   TEXT UTILITIES
   ============================================ */

.text-gradient-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-primary-color {
    color: #6366f1 !important;
}

.text-success-color {
    color: #4ade80 !important;
}

.text-danger-color {
    color: #ef4444 !important;
}

.text-warning-color {
    color: #f59e0b !important;
}

/* ============================================
   ANIMATION UTILITIES
   ============================================ */

.transition-standard {
    transition: all 0.3s ease;
}

.transition-fast {
    transition: all 0.2s ease;
}

.transition-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-2px);
}

.hover-lift-sm:hover {
    transform: translateY(-1px);
}

.hover-lift-lg:hover {
    transform: translateY(-4px);
}
