/* public/assets/css/components/category-view.css */

.category-view .quiz-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(204px,1fr));gap:1rem; margin-top: 1rem;}
.category-view .available-tests-title { color: var(--warning); font-size: 1.1rem; font-weight: 700; margin-bottom: 0rem; margin-top: 1.5rem; }

/* --- FINAL FIX FOR CARD ALIGNMENT --- */
.category-view .quiz-tile {
    padding: .7rem;
    border-radius: var(--radius);
    display: flex; /* This is the key property */
    flex-direction: column; /* Ensures content flows top-to-bottom */
    gap: .5rem;
    background: var(--surface);
    border: 1px solid var(--border);
}

.category-view .tile-body {
    flex-grow: 1; /* Allows this section to expand and fill available space */
}

.category-view .tile-footer {
    margin-top: auto; /* Pushes the footer to the bottom of the card */
    padding-top: .6rem;
}
/* --- END OF FIX --- */

.category-view .tile-meta-topics {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-view .tile-header{display:flex;align-items:center;justify-content:space-between;position:relative}
.category-view .tile-header h3{font-size:.85rem;font-weight:700}

/* Tile Title Section with Premium Lock */
.category-view .tile-title-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    flex: 1;
}

/* Premium Lock Icon for Category View - Adjacent to title in right corner */
.category-view .premium-lock {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-view .lock-icon {
    width: 16px;
    height: 16px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.category-view .premium-lock:hover .lock-icon {
    opacity: 1;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    }
}
.category-view .tile-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.category-view .label-free,
.category-view .label-paid {
    font-size: 0.6rem;
    font-weight: 800;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.category-view .label-free {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}
.category-view .label-paid {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}
.category-view .difficulty-tag{font-size:.65rem;font-weight:700;padding:.2rem .5rem;border-radius:999px;text-transform:uppercase}
.category-view .difficulty-tag-easy{color:var(--easy);background:rgba(16,185,129,.1)}
.category-view .difficulty-tag-medium{color:var(--med);background:rgba(245,158,11,.1)}
.category-view .difficulty-tag-hard{color:var(--hard);background:rgba(239,68,68,.1)}
.category-view .difficulty-tag-difficult{color:var(--difficult);background:rgba(167,139,250,.1)}
.category-view .difficulty-tag-veteran{color:var(--veteran);background:rgba(34,211,238,.1)}
.category-view .tile-meta{font-size:.7rem;color:var(--muted)}
.category-view .tile-status{font-size:.7rem;font-weight:500;padding:.4rem;margin-top:.5rem;border-radius:8px;background:var(--bg);border:1px solid var(--border)}
.category-view .tile-status strong{color:var(--primary)}
.category-view .action-buttons{display:flex;align-items:center;gap:.5rem}
.category-view .action-buttons .label-free,
.category-view .action-buttons .label-paid {
    font-size: 0.6rem;
    font-weight: 800;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.3rem;
}
.category-view .action-buttons .label-free {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}
.category-view .action-buttons .label-paid {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

/* Premium Content Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--warning);
}

.modal-content .warning-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-error);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #fff;
    font-size: 1.5rem;
}

.modal-content h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.modal-content p {
    font-size: .85rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-actions .btn {
    min-width: 120px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-actions .btn {
        width: 100%;
        max-width: 200px;
    }
}
