
/* ============================================================================
   SECTION COMPONENTS
   Common container patterns for sections with headers and content
   ============================================================================ */

.cards-section {
    background: var(--cards-bg-primary);
    border-radius: 12px;
    border: 1px solid var(--cards-border-primary);
    overflow: hidden;
    box-shadow: var(--cards-shadow-sm);
}

.cards-section.full-width {
    grid-column: 1 / -1;
}

.cards-section-header {
    background: var(--cards-bg-secondary);
    padding: 20px;
    border-bottom: 1px solid var(--cards-border-primary);
}

.cards-section-header.with-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cards-section-header h3,
.cards-section-header h4 {
    margin: 0;
    color: var(--cards-text-primary);
    font-size: 1.3rem;
}

.cards-section-content {
    padding: 25px;
}


/* ============================================================================
   GRID LAYOUTS
   Responsive grid systems for various content types
   ============================================================================ */

/* Auto-fit grid - adjusts columns based on content */
.cards-grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* Two-column grid */
.cards-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Large items grid (packs, products) */
.cards-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* Small items grid (cards, thumbnails) */
.cards-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

/* Compact items grid */
.cards-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}


/* ============================================================================
   CARD/ITEM COMPONENTS
   Individual item containers with consistent styling
   ============================================================================ */

.cards-item {
    background: var(--cards-bg-secondary);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease;
    border: 1px solid var(--cards-border-primary);
}

.cards-item-lg {
    padding: 20px;
    border-radius: 12px;
}

/* Hover effects - small lift */
.cards-item-hover-sm:hover {
    transform: translateY(-2px);
    box-shadow: var(--cards-shadow-md);
}

/* Hover effects - medium lift */
.cards-item-hover-md:hover {
    transform: translateY(-5px);
    box-shadow: var(--cards-shadow-lg);
}

/* Hover effects - large lift (for special items) */
.cards-item-hover-lg:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--cards-shadow-lg);
}

/* Slide hover effect (for lists) */
.cards-item-hover-slide:hover {
    transform: translateX(5px);
    box-shadow: var(--cards-shadow-md);
}


/* ============================================================================
   ACTIVITY FEED COMPONENTS
   Timeline and activity feed patterns
   ============================================================================ */

.cards-activity-feed {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cards-activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--cards-bg-secondary);
    border-radius: 8px;
}

.cards-activity-item.with-border {
    border-left: 4px solid #007bff;
}

.cards-activity-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cards-activity-content {
    flex: 1;
}

.cards-activity-content p {
    margin: 0;
    color: var(--cards-text-primary);
    font-size: 0.95rem;
}

.cards-activity-content small {
    color: var(--cards-text-secondary);
    font-size: 0.8rem;
}


/* ============================================================================
   ACTION CARD COMPONENTS
   Highlighted actionable items
   ============================================================================ */

.cards-action-item {
    background: var(--cards-bg-secondary);
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #007bff;
    transition: all 0.2s ease;
}

.cards-action-item:hover {
    transform: translateX(5px);
    box-shadow: var(--cards-shadow-md);
}

.cards-action-item h4 {
    margin: 0 0 8px 0;
    color: var(--cards-text-primary);
    font-size: 1.1rem;
}

.cards-action-item p {
    margin: 0 0 15px 0;
    color: var(--cards-text-secondary);
    font-size: 0.9rem;
}

/* Action item states */
.cards-action-item.success {
    border-left-color: #28a745;
}

.cards-action-item.warning {
    border-left-color: #ffc107;
}

.cards-action-item.danger {
    border-left-color: #dc3545;
}

.cards-action-item.info {
    border-left-color: #17a2b8;
}


/* ============================================================================
   IMAGE & PLACEHOLDER COMPONENTS
   Thumbnails and placeholder boxes
   ============================================================================ */


.cards-thumbnail-sm {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--cards-border-secondary);
}

.cards-thumbnail-md {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--cards-border-primary);
}

.cards-thumbnail-lg {
    width: 250px;
    height: 350px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--cards-shadow-md);
}


.cards-placeholder {
    background: var(--cards-bg-tertiary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--cards-text-secondary);
    text-align: center;
}

.cards-placeholder-sm {
    width: 50px;
    height: 50px;
    font-size: 0.7rem;
}

.cards-placeholder-md {
    width: 80px;
    height: 80px;
    font-size: 1rem;
}

.cards-placeholder-lg {
    width: 250px;
    height: 350px;
    font-size: 1.5rem;
}

/* Card Image Placeholders - For missing card images */
.card-image-container .placeholder {
    width: 143.81px;
    height: 200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cards-image-bg);
    border: 2px dashed var(--cards-image-border);
    border-radius: 4px;
    color: var(--cards-text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 10px;
    text-align: center;
    word-wrap: break-word;
    box-sizing: border-box;
}

/* Override rarity.css styles for placeholders to maintain dashed border appearance */
.card-image-container .placeholder.card-com,
.card-image-container .placeholder.card-ucm,
.card-image-container .placeholder.card-rar,
.card-image-container .placeholder.card-leg,
.card-image-container .placeholder.card-myt,
.card-image-container .placeholder.card-spe {
    border: 2px dashed var(--cards-image-border) !important;
    box-shadow: none !important;
    animation: none !important;
}

/* Maintain rarity-specific border colors for placeholders */
.card-image-container .placeholder.card-com {
    border-color: #6c757d !important;
    background: rgba(108, 117, 125, 0.05);
}

.card-image-container .placeholder.card-ucm {
    border-color: #198754 !important;
    background: rgba(25, 135, 84, 0.05);
}

.card-image-container .placeholder.card-rar {
    border-color: #0d6efd !important;
    background: rgba(13, 110, 253, 0.05);
}

.card-image-container .placeholder.card-leg {
    border-color: #ffaf4d !important;
    background: rgba(255, 175, 77, 0.05);
}

.card-image-container .placeholder.card-myt {
    border-color: #6f42c1 !important;
    background: rgba(111, 66, 193, 0.05);
}

.card-image-container .placeholder.card-spe {
    border-color: #00c3ff !important;
    background: linear-gradient(135deg, rgba(0, 195, 255, 0.1), rgba(28, 255, 77, 0.1));
}


/* ============================================================================
   EMPTY STATE COMPONENTS
   "No data" and empty state messages
   ============================================================================ */

.cards-empty-state,
.no-data,
.no-cards,
.no-history,
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--cards-text-muted);
    font-style: italic;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px dashed var(--cards-border-primary);
}

.cards-empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.cards-empty-state h4 {
    color: var(--cards-text-primary);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.cards-empty-state p {
    font-style: italic;
    margin: 0;
}


/* ============================================================================
   CONTAINER/BROWSER WRAPPERS
   Main content wrappers used across multiple pages
   ============================================================================ */

.cards-browser,
.card-browser {
    background: var(--cards-bg-primary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--cards-border-primary);
}

.cards-header,
.wishlist-header,
.filter-bar,
.color-key-container {
    background: var(--cards-bg-primary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--cards-border-primary);
    color: var(--cards-text-primary);
}

.wishlist-header h2,
.wishlist-header h3,
.wishlist-header p,
.cards-header h2,
.cards-header h3,
.cards-header p {
    color: var(--cards-text-primary);
}


/* ============================================================================
   SECTION TITLES
   Large centered section titles
   ============================================================================ */

.cards-section-title,
.section-title {
    text-align: center;
    color: var(--cards-text-primary);
    margin-bottom: 30px;
    font-size: 2rem;
    font-weight: 600;
}


/* ============================================================================
   RARITY DISTRIBUTION COMPONENTS
   Layout for displaying rarity statistics and series lists
   ============================================================================ */

.rarity-distribution {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rarity-item {
    background: var(--cards-bg-secondary);
    border: 1px solid var(--cards-border-primary);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rarity-info {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.rarity-badge-container {
    flex: 0 0 33%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.rarity-stats {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    text-align: right;
}

.rarity-stats .stat {
    font-size: 0.9rem;
    color: var(--cards-text-secondary);
    font-weight: 500;
}


/* ============================================================================
   SERIES LIST COMPONENTS
   Layout for displaying card series
   ============================================================================ */

.series-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.series-item {
    background: var(--cards-bg-secondary);
    border: 1px solid var(--cards-border-primary);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s ease;
}

.series-item:hover {
    transform: translateX(5px);
}

.series-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--cards-border-secondary);
}

.series-placeholder {
    width: 50px;
    height: 50px;
    background: var(--cards-bg-tertiary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--cards-text-secondary);
}

.series-info h4 {
    margin: 0 0 5px 0;
    color: var(--cards-text-primary);
    font-size: 1rem;
}

.series-stats {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.series-stats .stat {
    font-size: 0.8rem;
    color: var(--cards-text-secondary);
}


/* ============================================================================
   LEADERBOARD COMPONENTS
   Leaderboard sections and entries
   ============================================================================ */

.leaderboard-section {
    background: var(--cards-bg-primary);
    border-radius: 12px;
    border: 1px solid var(--cards-border-primary);
    overflow: hidden;
    box-shadow: var(--cards-shadow-sm);
    transition: transform 0.2s ease;
}

.leaderboard-section:hover {
    transform: translateY(-3px);
}

.leaderboard-header {
    background: var(--cards-bg-secondary);
    border-bottom: 1px solid var(--cards-border-primary);
    padding: 20px;
    color: var(--cards-text-primary);
    text-align: center;
}

.leaderboard-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--cards-text-primary);
}

.leaderboard-header small {
    color: var(--cards-text-secondary);
}

.leaderboard-content {
    padding: 0;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--cards-border-primary);
    transition: background-color 0.2s ease;
    position: relative;
    background: transparent;
}

.leaderboard-entry:hover {
    background: var(--cards-bg-tertiary);
}

.leaderboard-entry:last-child {
    border-bottom: none;
}

.leaderboard-entry.disabled {
    opacity: 0.5;
}

.rank {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--cards-text-secondary);
    min-width: 30px;
    text-align: center;
    margin-right: 15px;
}

.leaderboard-entry .rank {
    background: #007bff;
    color: white;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 50%;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.leaderboard-entry:nth-child(1) .rank {
    color: #ffd700;
}

.leaderboard-entry:nth-child(2) .rank {
    color: #c0c0c0;
}

.leaderboard-entry:nth-child(3) .rank {
    color: #cd7f32;
}

.user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.card-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.username {
    font-weight: 600;
    color: var(--cards-text-primary);
    font-size: 1rem;
}

.stat {
    font-size: 0.85rem;
    color: var(--cards-text-secondary);
}

.crown {
    font-size: 1.5rem;
    position: absolute;
    right: 15px;
    animation: cards-float 2s ease-in-out infinite;
}

@keyframes cards-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

.card-mini-thumb {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--cards-border-secondary);
}

.card-mini-placeholder {
    width: 30px;
    height: 30px;
    background: var(--cards-bg-tertiary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--cards-text-secondary);
}


/* ============================================================================
   STAT CARDS
   Statistics display cards used in dashboards
   ============================================================================ */

.stat-card,
.trading-stat,
.wishlist-stat,
.stat-item {
    background: var(--cards-bg-tertiary);
    border: 1px solid var(--cards-border-primary);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.stat-info h3,
.stat-info h4 {
    margin: 0;
    font-size: 2rem;
    font-weight: bold;
    color: var(--cards-text-primary);
}

.stat-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--cards-text-secondary);
}


/* ============================================================================
   BADGE COMPONENTS
   Rarity badges, status badges, and count indicators
   ============================================================================ */

/* Rarity Badges - Color-coded card rarity indicators */
.cards-rarity-badge,
.rarity-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    text-align: center;
    min-width: 60px;
}

.cards-rarity-com,
.rarity-badge.com,
.rarity-com {
    background: #28a745;
    color: white;
}

.cards-rarity-ucm,
.rarity-badge.ucm,
.rarity-ucm {
    background: #17a2b8;
    color: white;
}

.cards-rarity-rar,
.rarity-badge.rar,
.rarity-rar {
    background: #6f42c1;
    color: white;
}

.cards-rarity-leg,
.rarity-badge.leg,
.rarity-leg {
    background: #fd7e14;
    color: white;
}

.cards-rarity-myt,
.rarity-badge.myt,
.rarity-myt {
    background: #dc3545;
    color: white;
}

.cards-rarity-spe,
.rarity-badge.spe,
.rarity-spe {
    background: #ffc107;
    color: #212529;
}

/* Additional rarity variants used in some files */
.rarity-common {
    background: #6c757d;
    color: white;
}

.rarity-uncommon {
    background: #28a745;
    color: white;
}

.rarity-rare {
    background: #007bff;
    color: white;
}

.rarity-epic,
.rarity-legendary {
    background: #ffc107;
    color: #212529;
}

.rarity-mythical {
    background: #e83e8c;
    color: white;
}

/* Count Badges */
.cards-count-badge {
    background: var(--cards-bg-active);
    color: var(--cards-text-primary);
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 15px;
    font-weight: 600;
}

/* Status Badges */
.cards-status-badge {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
    display: inline-block;
}

.cards-status-success {
    background: #d4edda;
    color: #155724;
}

.cards-status-warning {
    background: #fff3cd;
    color: #856404;
}

.cards-status-danger {
    background: #f8d7da;
    color: #721c24;
}

.cards-status-info {
    background: #d1ecf1;
    color: #0c5460;
}


/* ============================================================================
   FORM ELEMENTS
   Themed form controls consistent with card design
   ============================================================================ */

.cards-form-control,
.cards-form-select {
    background-color: var(--cards-input-bg);
    border: 1px solid var(--cards-input-border);
    color: var(--cards-input-text);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.95rem;
    width: 100%;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.cards-form-control:focus,
.cards-form-select:focus {
    background-color: var(--cards-input-bg);
    border-color: var(--cards-input-border-focus);
    color: var(--cards-input-text);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.cards-form-select option {
    background-color: var(--cards-input-bg);
    color: var(--cards-input-text);
}


/* ============================================================================
   LOADING STATES
   Loading indicators and skeleton screens
   ============================================================================ */

.cards-loading-bar {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: cards-loading-animation 1.5s infinite;
    border-radius: 4px;
}

.cards-loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: var(--cards-text-muted);
}

.cards-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 123, 255, 0.1);
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: cards-spin 1s linear infinite;
}

.cards-spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 4px;
}


/* ============================================================================
   ANIMATIONS
   Reusable keyframe animations
   ============================================================================ */

@keyframes cards-slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cards-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes cards-loading-animation {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes cards-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes cards-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

/* Animation utility classes */
.cards-animate-slideInUp {
    animation: cards-slideInUp 0.3s ease-out;
}

.cards-animate-fadeIn {
    animation: cards-fadeIn 0.5s ease-out;
}

.cards-animate-pulse {
    animation: cards-pulse 2s infinite;
}


/* ============================================================================
   UTILITY CLASSES
   Helper classes for common styling needs
   ============================================================================ */

/* Flex utilities */
.cards-flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.cards-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cards-flex-column {
    display: flex;
    flex-direction: column;
}

.cards-flex-column-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Gap utilities */
.cards-gap-sm {
    gap: 10px;
}

.cards-gap-md {
    gap: 15px;
}

.cards-gap-lg {
    gap: 20px;
}

/* Text utilities */
.cards-text-center {
    text-align: center;
}

.cards-text-muted {
    color: var(--cards-text-muted);
}

.cards-text-bold {
    font-weight: 600;
}

/* Divider */
.cards-divider {
    border: 0;
    height: 1px;
    background-color: var(--cards-border-primary);
    margin: 2rem 0;
}


/* ============================================================================
   BANNERS
   Promotional banners and announcements
   ============================================================================ */

.banners-container {
    margin-bottom: 20px;
}

.banner-item {
    border: none;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 20px;
    box-shadow: var(--cards-shadow-sm);
}

.banner-item.has-image {
    padding: 0 !important;
    overflow: hidden !important;
}

.banner-item.has-image .banner-content {
    padding: 10px 15px !important;
}

.banner-item:last-child {
    margin-bottom: 0;
}

.banner-item.has-image .banner-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch !important;
    text-align: center;
    gap: 8px;
    width: 100% !important;
}

.banner-item.has-image .banner-image-container {
    display: block !important;
    width: 100% !important;
}

.banner-item.has-image .banner-image {
    width: 100% !important;
    height: 150px !important;
    border-radius: 8px 8px 0 0 !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
}

.banner-content {
    padding: 0;
}

.banner-title {
    margin: 0 0 10px 0;
    font-weight: 600;
    font-size: 1.2rem;
}

.banner-text {
    margin-bottom: 10px;
    line-height: 1.5;
}

.banner-text p:last-child {
    margin-bottom: 0;
}

/* Banner Alert Colors */
.alert-info.banner-item {
    background-color: rgba(13, 202, 240, 0.1);
    border: 1px solid rgba(13, 202, 240, 0.2);
    color: #0dcaf0;
}

.alert-success.banner-item {
    background-color: rgba(25, 135, 84, 0.1);
    border: 1px solid rgba(25, 135, 84, 0.2);
    color: #198754;
}

.alert-warning.banner-item {
    background-color: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.alert-danger.banner-item {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.alert-primary.banner-item {
    background-color: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.2);
    color: #0d6efd;
}

.alert-secondary.banner-item {
    background-color: rgba(108, 117, 125, 0.1);
    border: 1px solid rgba(108, 117, 125, 0.2);
    color: #6c757d;
}


/* ============================================================================
   MODAL COMPONENTS
   Common modal styling for cards system
   ============================================================================ */

.cards-modal-content,
.modal-content {
    background-color: var(--cards-bg-primary);
    border: 1px solid var(--cards-border-primary);
}

.cards-modal-header,
.modal-header {
    border-bottom: 1px solid var(--cards-border-primary);
}

.cards-modal-footer,
.modal-footer {
    border-top: 1px solid var(--cards-border-primary);
}

.cards-modal-title,
.modal-title {
    color: var(--cards-text-primary);
}

.cards-modal-body,
.modal-body {
    color: var(--cards-text-secondary);
}


/* ============================================================================
   QUICK LINKS
   Grid of quick access links used in dashboards
   ============================================================================ */

.cards-quick-links,
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.cards-quick-link,
.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: var(--cards-bg-secondary);
    border-radius: 8px;
    text-decoration: none;
    color: var(--cards-text-primary);
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.cards-quick-link:hover,
.quick-link:hover {
    color: #007bff;
    background: var(--cards-bg-tertiary);
    border-color: #007bff;
    transform: translateY(-2px);
    text-decoration: none;
}

.cards-link-icon,
.link-icon {
    font-size: 1.8rem;
}

.cards-quick-link span,
.quick-link span {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}


/* ============================================================================
   PACK COMPONENTS
   Base pack card styling used across store and pack opening pages
   ============================================================================ */

.cards-pack-container,
.pack-display-holder {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 240px));
    gap: 20px;
    justify-content: center;
}

.cards-pack-card,
.pack-card {
    background: var(--cards-bg-secondary);
    border: 1px solid var(--cards-image-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cards-pack-card:hover,
.pack-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--cards-shadow-lg);
    border-color: var(--cards-border-primary);
}

.cards-pack-image-container,
.pack-image-container {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cards-bg-primary);
}

.cards-pack-image,
.pack-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cards-pack-placeholder,
.pack-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cards-text-muted);
    font-size: 16px;
    text-align: center;
}

.cards-pack-info,
.pack-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    color: var(--cards-text-primary);
}

.cards-pack-name,
.pack-name {
    color: var(--cards-text-primary);
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.cards-pack-series,
.pack-series {
    color: var(--cards-text-muted);
    margin: 0 0 15px 0;
    font-size: 0.9rem;
}

.cards-pack-actions,
.pack-actions {
    margin-top: 8px;
}


/* ============================================================================
   TRADER/USER CARD COMPONENTS
   User profile cards used in trading pages
   ============================================================================ */

.cards-trader-card,
.trader-card {
    background: var(--cards-bg-primary);
    border: 1px solid var(--cards-border-primary);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.cards-trader-card:hover,
.trader-card:hover {
    background: var(--cards-bg-secondary);
    border-color: var(--cards-border-secondary);
    transform: translateY(-2px);
    box-shadow: var(--cards-shadow-md);
}

.cards-trader-info,
.trader-info h5 {
    color: var(--cards-text-primary);
    margin-bottom: 8px;
    font-weight: 600;
}

.cards-trader-bio,
.trader-bio {
    color: var(--cards-text-secondary);
    font-size: 0.85rem;
    margin-top: 8px;
}

.cards-trader-actions,
.trader-actions {
    margin-top: 12px;
}


/* ============================================================================
   CONTACT INFO COMPONENTS
   Contact information display boxes
   ============================================================================ */

.cards-contact-info,
.contact-info {
    background: var(--cards-bg-primary);
    border: 1px solid var(--cards-border-primary);
    border-radius: 6px;
    padding: 15px;
}

.cards-contact-info h5,
.contact-info h5 {
    color: var(--cards-text-primary);
    margin-bottom: 10px;
    font-size: 1rem;
}

.cards-contact-info p,
.contact-info p {
    color: var(--cards-text-secondary);
    margin: 0;
    font-size: 0.9rem;
}


/* ============================================================================
   RESPONSIVE BREAKPOINTS
   Mobile and tablet adjustments
   ============================================================================ */

@media (max-width: 768px) {
    /* Grid adjustments */
    .cards-grid-2col {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cards-grid-auto {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

    .cards-grid-large {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Section adjustments */
    .cards-section-header {
        padding: 15px;
    }

    .cards-section-header.with-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .cards-section-content {
        padding: 20px;
    }

    /* Item adjustments */
    .cards-item {
        padding: 12px;
    }

    .cards-item-lg {
        padding: 15px;
    }

    /* Activity items */
    .cards-activity-item {
        flex-direction: column;
        text-align: center;
    }

    /* Banner adjustments */
    .banner-image {
        width: 100%;
        max-height: 150px;
    }

    /* Quick links adjustments */
    .cards-quick-links,
    .quick-links {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }

    .cards-quick-link,
    .quick-link {
        padding: 15px;
    }

    .cards-link-icon,
    .link-icon {
        font-size: 1.5rem;
    }

    /* Pack components adjustments */
    .cards-pack-container,
    .pack-display-holder {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    /* Grid adjustments */
    .cards-grid-small {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }

    .cards-grid-compact {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    /* Section adjustments */
    .cards-section-header {
        padding: 12px;
    }

    .cards-section-header h3,
    .cards-section-header h4 {
        font-size: 1.1rem;
    }

    .cards-section-content {
        padding: 15px;
    }

    /* Typography */
    .cards-empty-state h4 {
        font-size: 1rem;
    }

    .cards-empty-state {
        padding: 30px 15px;
    }

    /* Action items */
    .cards-action-item {
        padding: 15px;
    }

    .cards-action-item h4 {
        font-size: 1rem;
    }
}
