/* Modern Super Ace Component Styles */

.super-ace-container {
    margin-bottom: 2rem;
    margin-top: 2rem;
}

/* Collapsed state - compact bar */
.super-ace-compact {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.super-ace-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.3);
}

/* Animated gradient border on hover */
.super-ace-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 215, 0, 0.3) 50%,
    transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.super-ace-compact:hover::before {
    opacity: 1;
    animation: gradient-sweep 2s linear infinite;
}

@keyframes gradient-sweep {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Compact bar content */
.super-ace-compact-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.super-ace-compact-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.super-ace-logo {
    height: 32px;
    width: auto;
    aspect-ratio: 16 / 9;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.super-ace-compact-info {
    display: flex;
    flex-direction: column;
}

.super-ace-label {
    font-size: 0.875rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.super-ace-amount {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(to right, #ffd700, #ffae00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.super-ace-compact-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.super-ace-teaser {
    text-align: right;
}

.super-ace-teaser-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.super-ace-teaser-value {
    font-size: 1.125rem;
    color: #f1f5f9;
    font-weight: 600;
}

.super-ace-course-separator {
    margin: 0 0.5rem;
    opacity: 0.6;
}

.super-ace-expand-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f1f5f9;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.super-ace-compact:hover .super-ace-expand-icon {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.3);
    transform: rotate(180deg);
}

/* Expanded state */
.super-ace-expanded {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
    animation: expand-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes expand-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Expanded content sections */
.super-ace-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 2rem;
    border-bottom: 3px solid rgba(255, 215, 0, 0.3);
}

.super-ace-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.super-ace-header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.super-ace-logo-large {
    height: 48px;
    width: auto;
    aspect-ratio: 16 / 9;
}

.super-ace-header-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.super-ace-amount-large {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(to right, #ffd700, #ffae00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.super-ace-description {
    color: #cbd5e1;
    margin-top: 0.5rem;
}

.super-ace-close-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #f1f5f9;
}

.super-ace-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Content sections */
.super-ace-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.super-ace-opportunities {
    padding: 2rem;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
}

.super-ace-winners {
    padding: 2rem;
}

.super-ace-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.super-ace-section-title i {
    color: #6366f1;
}

/* Opportunity cards */
.opportunity-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.opportunity-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #6366f1;
}

.opportunity-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.opportunity-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.opportunity-info h5 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.opportunity-date {
    color: #64748b;
    font-size: 0.875rem;
}

.opportunity-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 3.5rem;
}

.opportunity-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #475569;
    font-size: 0.875rem;
}

.opportunity-detail i {
    color: #94a3b8;
    width: 16px;
}

.distance-badge {
    background: #f1f5f9;
    color: #475569;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Winner cards */
.winner-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.winner-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.winner-avatar {
    position: relative;
}

.winner-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.winner-initials {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.winner-info {
    flex: 1;
}

.winner-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.winner-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.winner-amount {
    color: #10b981;
    font-weight: 600;
}

.winner-date {
    color: #64748b;
}

/* Action buttons */
.super-ace-actions {
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Mobile responsiveness */
@media (max-width: 767px) {
    .super-ace-container {
        margin-top: 0.25rem;
        margin-bottom: 0.5rem;
    }

    .super-ace-compact-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .super-ace-compact-right {
        flex-direction: column;
        gap: 1rem;
    }

    .super-ace-content {
        grid-template-columns: 1fr;
    }

    .super-ace-opportunities {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .super-ace-header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .super-ace-header-left {
        flex-direction: column;
    }
}

/* Dark mode support */
[data-bs-theme="dark"] {
    .super-ace-expanded {
        background: var(--surface-1);
    }

    .super-ace-opportunities {
        background: var(--surface-2);
        border-color: var(--border-color);
    }

    .super-ace-winners {
        background: var(--surface-1);
    }

    .opportunity-card {
        background: var(--surface-1);
        border-color: var(--border-color);
    }

    .winner-card {
        background: var(--surface-2);
    }

    .super-ace-actions {
        background: var(--surface-2);
        border-color: var(--border-color);
    }
}