/**
 * Kids Skills Platform - Custom Styles
 * منصة تنمية مهارات الأطفال
 */

/* ===== Root Variables ===== */
:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
}

/* ===== General Styles ===== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
}

/* Arabic Font Support */
body[dir="rtl"] {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== Sidebar Styles ===== */
.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--primary-color) 10%, #224abe 100%);
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 1rem;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: #fff;
    font-weight: 600;
}

/* ===== Card Styles ===== */
.card {
    border: none;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
}

/* ===== Dashboard Stats Cards ===== */
.stats-card {
    border-left: 0.25rem solid;
}

.stats-card.primary {
    border-left-color: var(--primary-color);
}

.stats-card.success {
    border-left-color: var(--success-color);
}

.stats-card.info {
    border-left-color: var(--info-color);
}

.stats-card.warning {
    border-left-color: var(--warning-color);
}

/* RTL Support for Stats Cards */
[dir="rtl"] .stats-card {
    border-left: none;
    border-right: 0.25rem solid;
}

[dir="rtl"] .stats-card.primary {
    border-right-color: var(--primary-color);
}

[dir="rtl"] .stats-card.success {
    border-right-color: var(--success-color);
}

[dir="rtl"] .stats-card.info {
    border-right-color: var(--info-color);
}

[dir="rtl"] .stats-card.warning {
    border-right-color: var(--warning-color);
}

/* ===== Booking Status Badges ===== */
.badge-new {
    background-color: var(--info-color);
}

.badge-trial-scheduled {
    background-color: #6f42c1;
}

.badge-trial-accepted {
    background-color: #20c9a6;
}

.badge-trial-completed {
    background-color: #17a2b8;
}

.badge-awaiting-plan {
    background-color: var(--warning-color);
    color: #000;
}

.badge-plan-sent {
    background-color: #fd7e14;
}

.badge-paid {
    background-color: var(--success-color);
}

.badge-active {
    background-color: var(--primary-color);
}

.badge-completed {
    background-color: #28a745;
}

.badge-cancelled {
    background-color: var(--danger-color);
}

/* ===== Form Styles ===== */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* ===== Button Styles ===== */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

/* ===== Table Styles ===== */
.table-hover tbody tr:hover {
    background-color: rgba(78, 115, 223, 0.05);
}

/* ===== Loading Spinner ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
    }
}

/* ===== Client Layout Styles ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6610f2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.page-header .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
}

.page-header .breadcrumb-item.active {
    color: white;
}

/* ===== Activity Cards ===== */
.activity-card {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.activity-card .card-img-top {
    height: 180px;
    object-fit: cover;
}

.activity-card .age-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

[dir="rtl"] .activity-card .age-badge {
    right: auto;
    left: 10px;
}

/* ===== Provider Cards ===== */
.provider-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.provider-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.provider-card .provider-logo {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.provider-card .rating {
    color: #ffc107;
}

.provider-card .distance-badge {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
}

/* ===== Booking Timeline ===== */
.booking-timeline {
    position: relative;
    padding-left: 30px;
}

[dir="rtl"] .booking-timeline {
    padding-left: 0;
    padding-right: 30px;
}

.booking-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

[dir="rtl"] .booking-timeline::before {
    left: auto;
    right: 10px;
}

.booking-timeline .timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.booking-timeline .timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--primary-color);
}

[dir="rtl"] .booking-timeline .timeline-item::before {
    left: auto;
    right: -24px;
}

.booking-timeline .timeline-item.completed::before {
    background: var(--success-color);
    box-shadow: 0 0 0 2px var(--success-color);
}

.booking-timeline .timeline-item.cancelled::before {
    background: var(--danger-color);
    box-shadow: 0 0 0 2px var(--danger-color);
}

/* ===== Wallet Styles ===== */
.wallet-card {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    color: white;
    border-radius: 1rem;
}

.wallet-card .balance {
    font-size: 2.5rem;
    font-weight: 700;
}

.transaction-item {
    border-left: 3px solid transparent;
    transition: background-color 0.2s;
}

[dir="rtl"] .transaction-item {
    border-left: none;
    border-right: 3px solid transparent;
}

.transaction-item:hover {
    background-color: #f8f9fa;
}

.transaction-item.topup {
    border-left-color: var(--success-color);
}

[dir="rtl"] .transaction-item.topup {
    border-right-color: var(--success-color);
}

.transaction-item.deduction {
    border-left-color: var(--danger-color);
}

[dir="rtl"] .transaction-item.deduction {
    border-right-color: var(--danger-color);
}

/* ===== Report Progress ===== */
.progress-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(var(--primary-color) var(--progress), #e9ecef var(--progress));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-circle::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: white;
}

.progress-circle .percentage {
    position: relative;
    z-index: 1;
    font-size: 1.5rem;
    font-weight: 700;
}

/* ===== Skill Level Badges ===== */
.level-advanced {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    color: white;
}

.level-excellent {
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    color: white;
}

.level-very-good {
    background: linear-gradient(135deg, #0dcaf0 0%, #0d6efd 100%);
    color: white;
}

.level-good {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #000;
}

.level-acceptable {
    background: linear-gradient(135deg, #fd7e14 0%, #dc3545 100%);
    color: white;
}

.level-weak {
    background: linear-gradient(135deg, #dc3545 0%, #6f42c1 100%);
    color: white;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 3rem;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.empty-state h5 {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #adb5bd;
}

/* ===== Star Rating ===== */
.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
}

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    font-size: 1.5rem;
    color: #dee2e6;
    transition: color 0.2s;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #ffc107;
}

/* ===== Notification Styles ===== */
.notification-list .notification-item {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s;
}

.notification-list .notification-item:hover {
    background-color: #f8f9fa;
}

.notification-list .notification-item.unread {
    background-color: #f0f7ff;
    border-left: 3px solid var(--primary-color);
}

[dir="rtl"] .notification-list .notification-item.unread {
    border-left: none;
    border-right: 3px solid var(--primary-color);
}

/* ===== Category Grid ===== */
.category-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    color: inherit;
}

.category-card .icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
}

/* ===== Slider/Carousel ===== */
.hero-slider .carousel-item {
    height: 400px;
    background-size: cover;
    background-position: center;
}

.hero-slider .carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 1rem;
    padding: 2rem;
}

@media (max-width: 768px) {
    .hero-slider .carousel-item {
        height: 250px;
    }
    
    .hero-slider .carousel-caption {
        padding: 1rem;
    }
    
    .hero-slider .carousel-caption h2 {
        font-size: 1.25rem;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}
