/* Common Components CSS for Finance Gateway */
/* This file contains shared styles for reusable UI components */

/* ============================================ */
/* APP CARDS - Standardized styling */
/* ============================================ */

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.app-card {
    background: #1a1d21;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid #2d3138;
    position: relative;
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: inherit;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00ffff, #00cccc);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 255, 255, 0.15);
    border-color: #00ffff;
}

.app-card:hover::before {
    opacity: 1;
}

.app-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.app-card.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: #2d3138;
}

.app-card.disabled::before {
    background: #666;
}

.app-card-content {
    padding: 32px 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.app-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.3;
}

.app-card:hover .app-title {
    color: #00ffff;
}

.app-card.disabled .app-title {
    color: #666;
}

/* Legacy support for old app-link structure */
.app-link {
    color: white;
    text-decoration: none;
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.3;
}

.app-link:hover {
    color: #00ffff;
}

.app-card.disabled .app-link {
    color: #666;
    cursor: not-allowed;
}

.app-status {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.status-published {
    color: #00ffff;
}

.status-not-published {
    color: #888;
}

.status-beta {
    color: #ff9500;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* Beta app cards - orange glow effect */
.app-card.beta {
    border-color: rgba(255, 149, 0, 0.3);
}

.app-card.beta::before {
    background: linear-gradient(90deg, #ff9500, #ff6b00);
}

.app-card.beta:hover {
    box-shadow: 0 12px 40px rgba(255, 149, 0, 0.25);
    border-color: #ff9500;
}

.app-card.beta:hover .app-title {
    color: #ff9500;
}

/* Beta leaderboard cards - orange glow effect */
.leaderboard-card.beta {
    border-color: rgba(255, 149, 0, 0.3);
    box-shadow: 0 4px 20px rgba(255, 149, 0, 0.15);
}

.leaderboard-card.beta:hover {
    border-color: #ff9500;
    box-shadow: 0 8px 30px rgba(255, 149, 0, 0.25);
}

/* Beta status badge styling */
.status-badge.status-beta {
    background: rgba(255, 149, 0, 0.1);
    border: 1px solid rgba(255, 149, 0, 0.3);
    color: #ff9500;
}

.status-badge.status-beta .status-indicator {
    background: #ff9500;
}

/* ============================================ */
/* RESPONSIVE DESIGN */
/* ============================================ */

@media (max-width: 768px) {
    .apps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ============================================ */
/* SECTION CARDS - For homepage sections */
/* ============================================ */

.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.section-card {
    background: #1a1d21;
    border-radius: 12px;
    border: 1px solid #2d3138;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 140px;
}

.section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00ffff, #00cccc);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.section-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 255, 255, 0.15);
    border-color: #00ffff;
}

.section-card:hover::before {
    opacity: 1;
}

.section-link {
    color: inherit;
    text-decoration: none;
    display: block;
    padding: 20px;
    height: 100%;
}

.section-icon {
    margin-bottom: 12px;
    display: block;
    transition: transform 0.3s ease;
}

.section-card:hover .section-icon {
    transform: scale(1.1) rotate(5deg);
}

.section-icon svg {
    transition: all 0.3s ease;
}

.section-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.section-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: white;
    line-height: 1.2;
}

.section-tagline {
    font-size: 0.85rem;
    color: #00ffff;
    margin-bottom: 10px;
    font-weight: 500;
}

.section-description {
    font-size: 0.8rem;
    color: #a0a0a0;
    line-height: 1.4;
    margin-bottom: 12px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.section-stats {
    margin-bottom: 12px;
}

.stats-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 12px;
    margin-right: 6px;
    margin-bottom: 6px;
    background: #2d3138;
    color: #a0a0a0;
}

.stats-badge.live {
    background: rgba(0, 255, 255, 0.15);
    color: #00ffff;
}

.stats-badge.coming {
    background: rgba(102, 102, 102, 0.2);
    color: #888;
}

.section-cta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #00ffff;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.section-card:hover .section-cta {
    transform: translateX(4px);
}

.section-cta svg {
    transition: transform 0.3s ease;
}

.section-card:hover .section-cta svg {
    transform: rotate(45deg);
}

/* ============================================ */
/* RESPONSIVE DESIGN FOR SECTIONS */
/* ============================================ */

@media (max-width: 768px) {
    .sections-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 100%;
    }

    .section-card {
        min-height: 120px;
    }

    .section-link {
        padding: 16px;
    }

    .section-icon {
        margin-bottom: 8px;
    }

    .section-card-title {
        font-size: 1.1rem;
        margin-bottom: 4px;
    }

    .section-tagline {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }

    .section-description {
        font-size: 0.75rem;
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
    }

    .section-stats {
        margin-bottom: 8px;
    }

    .stats-badge {
        padding: 3px 6px;
        font-size: 0.65rem;
        margin-right: 4px;
        margin-bottom: 4px;
    }

    .section-cta {
        font-size: 0.75rem;
        gap: 4px;
    }
}

/* ============================================ */
/* LOADING AND ERROR STATES */
/* ============================================ */

.sections-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    grid-column: 1 / -1;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #2d3138;
    border-top: 3px solid #00ffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.sections-loading p {
    color: #a0a0a0;
    font-size: 1rem;
    margin: 0;
}

.sections-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    grid-column: 1 / -1;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.sections-error h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.sections-error p {
    color: #a0a0a0;
    font-size: 1rem;
    margin-bottom: 30px;
    max-width: 400px;
    line-height: 1.5;
}

.retry-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.retry-button:hover {
    background: #0056b3;
}

.stats-badge.loading {
    background: #2d3138;
    color: #a0a0a0;
    animation: pulse 1.5s ease-in-out infinite;
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}