/**
 * App Grid Styles
 * Responsive app card styling using Bootstrap utilities and custom properties
 */

/* App Card Base Styling */
.app-card {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background-color: var(--bs-tertiary-bg);
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    min-height: 160px;
    
    /* Responsive padding using Bootstrap spacing utilities */
    padding: 0.75rem; /* Default mobile */
}

/* Responsive padding adjustments */
@media (min-width: 576px) {
    .app-card {
        padding: 1rem; /* Small screens and up */
        min-height: 180px;
    }
}

@media (min-width: 768px) {
    .app-card {
        padding: 1.25rem; /* Medium screens and up */
        min-height: 200px;
    }
}

@media (min-width: 992px) {
    .app-card {
        padding: 1.5rem; /* Large screens and up */
        min-height: 220px;
    }
}

@media (min-width: 1200px) {
    .app-card {
        padding: 1.75rem; /* Extra large screens and up */
        min-height: 240px;
    }
}

/* App Card Hover Effects */
.app-card:hover {
    background-color: var(--bs-secondary-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

/* Dark theme hover adjustments */
[data-bs-theme="dark"] .app-card:hover {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* App Icon Container */
.app-icon {
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-primary-dark, #0056b3));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
    
    /* Responsive sizing - increased from previous values */
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Responsive icon sizing */
@media (min-width: 576px) {
    .app-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 0.625rem;
        font-size: 1.3rem;
    }
}

@media (min-width: 768px) {
    .app-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 0.75rem;
        font-size: 1.5rem;
    }
}

@media (min-width: 992px) {
    .app-icon {
        width: 72px;
        height: 72px;
        margin-bottom: 0.875rem;
        font-size: 1.7rem;
    }
}

@media (min-width: 1200px) {
    .app-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
        font-size: 1.9rem;
    }
}

/* App Icon FontAwesome Icons - Responsive sizing */
.app-icon i {
    font-size: inherit;
}

/* App Title */
.app-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--bs-body-color);
    flex-shrink: 0;
    
    /* Responsive font sizing */
    font-size: 0.75rem; /* Mobile */
    line-height: 1.2;
}

@media (min-width: 576px) {
    .app-title {
        font-size: 0.8rem;
    }
}

@media (min-width: 768px) {
    .app-title {
        font-size: 0.85rem;
    }
}

@media (min-width: 992px) {
    .app-title {
        font-size: 0.9rem;
    }
}

@media (min-width: 1200px) {
    .app-title {
        font-size: 0.95rem;
    }
}

/* App URL */
.app-url {
    color: var(--bs-secondary);
    margin-bottom: 0;
    flex-shrink: 0;
    
    /* Responsive font sizing */
    font-size: 0.65rem; /* Mobile */
    line-height: 1.3;
    opacity: 0.8;
}

@media (min-width: 576px) {
    .app-url {
        font-size: 0.68rem;
    }
}

@media (min-width: 768px) {
    .app-url {
        font-size: 0.7rem;
    }
}

@media (min-width: 992px) {
    .app-url {
        font-size: 0.72rem;
    }
}

@media (min-width: 1200px) {
    .app-url {
        font-size: 0.75rem;
    }
}

/* Loading State Spinner */
.app-grid-loading {
    padding: 2rem;
    text-align: center;
}

/* Error State Alert */
.app-grid-error .alert {
    margin: 1rem 0;
}

.app-grid-error .alert i {
    font-size: 1.1rem;
}

/* Grid Gap Responsive Adjustments */
.app-grid-container {
    gap: 0.75rem; /* Mobile */
}

@media (min-width: 576px) {
    .app-grid-container {
        gap: 1rem;
    }
}

@media (min-width: 768px) {
    .app-grid-container {
        gap: 1.25rem;
    }
}

@media (min-width: 992px) {
    .app-grid-container {
        gap: 1.5rem;
    }
}

/* Focus states for accessibility */
.app-card:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
    border-color: var(--bs-primary);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .app-card {
        transition: none;
    }
    
    .app-card:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .app-card {
        border-width: 2px;
    }
    
    .app-icon {
        border: 2px solid currentColor;
    }
}
