/**
 * Itamde Dashboard Styles
 * Styles for the unified dashboard and course filters
 */

/* ===========================
   FILTERS SECTION
   =========================== */

.itamde-courses-filters {
    background: #f8f9fa;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.itamde-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 180px;
    flex: 1 1 auto;
}

.itamde-filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

/* Search Group - Wider */
.itamde-search-group {
    flex: 2 1 300px;
    position: relative;
}

.itamde-search-input {
    width: 100%;
    padding: 10px 40px 10px 15px !important;
    border: 2px solid #e1e4e8 !important;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: white;
}

.itamde-search-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.itamde-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 12px; /* Compensate for label height */
    cursor: pointer;
    color: #9ca3af;
    font-size: 18px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.itamde-search-clear:hover {
    background-color: #e5e7eb;
    color: #374151;
}

/* Select Dropdowns */
.itamde-filter-select {
    width: 100%;
    padding: 10px 35px 10px 15px;
    border: 2px solid #e1e4e8;
    border-radius: 6px;
    font-size: 14px;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.itamde-filter-select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.itamde-filter-select:hover {
    border-color: #cbd5e0;
}

/* Reset Button */
.itamde-filter-group .itamde-btn-secondary {
    width: 100%;
    padding: 10px 20px;
    border: 2px solid #e1e4e8;
    background-color: white;
    color: #4a5568;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
}

.itamde-filter-group .itamde-btn-secondary:hover {
    background-color: #f7fafc;
    border-color: #cbd5e0;
    color: #2d3748;
}

.itamde-filter-group .itamde-btn-secondary:active {
    background-color: #edf2f7;
}

/* No Results Message */
.itamde-no-results {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.itamde-no-results p {
    margin: 0;
    color: #78350f;
    font-size: 15px;
    font-weight: 500;
}

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

@media (max-width: 1024px) {
    .itamde-courses-filters {
        gap: 12px;
    }

    .itamde-filter-group {
        min-width: 150px;
    }

    .itamde-search-group {
        flex: 1 1 250px;
    }
}

@media (max-width: 768px) {
    .itamde-courses-filters {
        flex-direction: column;
        padding: 15px;
        gap: 10px;
    }

    .itamde-filter-group,
    .itamde-search-group {
        width: 100%;
        flex: 1 1 100%;
        min-width: 100%;
    }

    .itamde-filter-group label {
        font-size: 12px;
    }

    .itamde-search-input,
    .itamde-filter-select,
    .itamde-filter-group .itamde-btn-secondary {
        padding: 12px 15px;
        font-size: 15px;
    }

    .itamde-search-clear {
        margin-top: 14px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .itamde-courses-filters {
        padding: 12px;
    }

    .itamde-search-input,
    .itamde-filter-select {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* ===========================
   COURSES GRID & CARDS
   =========================== */

.itamde-courses-wrapper {
    margin-top: 20px;
}

.itamde-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.itamde-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.itamde-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.itamde-card-image {
    position: relative;
    overflow: hidden;
}

.itamde-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.itamde-card:hover .itamde-card-image img {
    transform: scale(1.05);
}

.itamde-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.itamde-card-badge.not-started {
    background: #94a3b8;
    color: white;
}

.itamde-card-badge.in-progress {
    background: #3b82f6;
    color: white;
}

.itamde-card-badge.completed {
    background: #10b981;
    color: white;
}

.itamde-card-content {
    padding: 20px;
}

.itamde-card-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.itamde-card-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.itamde-card-title a:hover {
    color: #4f46e5;
}

.itamde-progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.itamde-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.itamde-progress-text {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 15px 0;
    font-weight: 500;
}

.itamde-btn-primary {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    background: #4f46e5;
    color: white;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
}

.itamde-btn-primary:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

/* ===========================
   PAGINATION
   =========================== */

.itamde-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
}

.itamde-pagination-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4a5568;
    font-size: 14px;
    font-weight: 500;
}

.itamde-pagination-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid #e1e4e8;
    border-radius: 6px;
    color: #4a5568;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.itamde-pagination-btn:hover:not(:disabled) {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.itamde-pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .itamde-pagination {
        flex-direction: column;
        gap: 15px;
    }

    .itamde-pagination-btn span {
        display: none;
    }

    .itamde-pagination-btn::after {
        content: '←';
    }

    .itamde-pagination-next::after {
        content: '→';
    }

    .itamde-grid {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   EMPTY STATE
   =========================== */

.itamde-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #cbd5e0;
}

.itamde-empty p {
    color: #6b7280;
    font-size: 16px;
    margin-bottom: 20px;
}

.itamde-empty .itamde-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #4f46e5;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.itamde-empty .itamde-btn:hover {
    background: #4338ca;
    transform: translateY(-2px);
}
