/* style.css - kogu faili sisu parandatud versiooniga */
/* Põhilised stiilid */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
}

/* Kaardid */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    background-color: #f1f5f9;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.25rem;
}

/* Nupud */
.btn-primary {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

.btn-success {
    background-color: #22c55e;
    border-color: #22c55e;
}

.btn-success:hover {
    background-color: #16a34a;
    border-color: #16a34a;
}

.btn-danger {
    background-color: #ef4444;
    border-color: #ef4444;
}

.btn-danger:hover {
    background-color: #dc2626;
    border-color: #dc2626;
}

/* Statistika kaardid */
.stat-card {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.stat-card-blue {
    background-color: #e0f2fe;
    border-left: 5px solid #3b82f6;
}

.stat-card-green {
    background-color: #dcfce7;
    border-left: 5px solid #22c55e;
}

.stat-card-purple {
    background-color: #f3e8ff;
    border-left: 5px solid #a855f7;
}

.stat-card-yellow {
    background-color: #fef9c3;
    border-left: 5px solid #eab308;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

/* Tabelid */
.table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.table thead th {
    background-color: #f1f5f9;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

.table-actions {
    white-space: nowrap;
}

/* Vormid */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
}

.form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
}

.required-field::after {
    content: "*";
    color: #ef4444;
    margin-left: 0.25rem;
}

/* Teated */
.alert {
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.alert-danger {
    background-color: #fee2e2;
    border-color: #fecaca;
    color: #b91c1c;
}

/* Üldkujundus */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

/* Modaalid */
.modal-header {
    background-color: #f1f5f9;
    border-bottom: 1px solid #e9ecef;
}

.modal-footer {
    background-color: #f1f5f9;
    border-top: 1px solid #e9ecef;
}

/* Minu treeningud leht */
.training-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.training-card-header {
    padding: 1rem 1.25rem;
    background-color: #e0f2fe;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.training-card-body {
    padding: 1.25rem;
    background-color: white;
}

.training-discipline {
    background-color: #dbeafe;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    color: #1e40af;
}

.training-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 1.25rem;
}

.training-info-label {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.training-info-value {
    font-weight: 500;
}

.training-notes {
    background-color: #f8fafc;
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 0.75rem;
}

/* Login leht */
.login-container {
    max-width: 400px;
    margin: 100px auto;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.login-card-header {
    background-color: #f1f5f9;
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem;
    text-align: center;
}

.login-card-body {
    padding: 2rem;
}

/* Paigaldusleht */
.setup-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.setup-step {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    background-color: #f1f5f9;
}

.setup-step-number {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background-color: #3b82f6;
    color: white;
    font-weight: bold;
    margin-right: 1rem;
}

.setup-step-content {
    flex: 1;
}

.setup-step-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.setup-step.completed {
    background-color: #dcfce7;
}

.setup-step.completed .setup-step-number {
    background-color: #22c55e;
}

.setup-step.active {
    border: 2px solid #3b82f6;
}

/* Kalendri stiilid */
.calendar-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
}

.calendar-day {
    height: 120px;
    vertical-align: top;
    padding: 5px;
    position: relative;
    border: 1px solid #e5e7eb;
}

.empty-day {
    background-color: #f9f9f9;
}

.today {
    background-color: #e6f7ff;
    border: 2px solid #3b82f6;
}

.has-trainings {
    background-color: #f0f9ff;
}

.day-number {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.day-trainings {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-top: 4px;
}

.training-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 2px;
    margin-bottom: 2px;
}

.own-training-dot {
    border: 1px solid #22c55e;
}

.canceled-training-dot {
    border: 1px solid #ef4444;
    background-color: #fee2e2;
}

/* Mobile day modal */
.mobile-day-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mobile-day-modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.mobile-day-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-day-modal-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin: 0;
}

.mobile-day-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
}

.mobile-day-events {
    margin-bottom: 15px;
}

.mobile-event-item {
    padding: 12px;
    border-radius: 8px;
    background-color: #f1f5f9;
    margin-bottom: 10px;
    position: relative;
    z-index: 5;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid #3b82f6;
}

.mobile-event-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.mobile-event-item.own-training {
    border-left-color: #22c55e;
}

.mobile-event-item.canceled-event {
    background-color: #fee2e2;
    border-left-color: #ef4444;
    color: #b91c1c;
}

.mobile-event-time {
    font-weight: bold;
    color: #1e40af;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.mobile-event-time i {
    margin-right: 6px;
}

.mobile-event-title {
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.mobile-event-trainer {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 6px;
    display: flex;
    align-items: center;
}

.mobile-event-trainer i {
    margin-right: 6px;
}

.mobile-day-empty {
    padding: 30px 20px;
    text-align: center;
    color: #6b7280;
    background-color: #f8fafc;
    border-radius: 8px;
    font-size: 1.1rem;
}

/* Mobiiliversiooni täiendused */
@media (max-width: 768px) {
    .card {
        margin-bottom: 15px;
    }
    
    .stat-card {
        margin-bottom: 10px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .btn-responsive {
        width: 100%;
        margin-bottom: 5px;
    }
    
    /* Kalendrivaate mobiilsõbralikkus */
    .calendar-table {
        margin-bottom: 0;
    }
    
    .calendar-day {
        height: auto;
        min-height: 60px;
        padding: 4px;
        overflow: hidden;
    }
    
    .day-number {
        font-size: 1rem;
        margin-bottom: 3px;
        text-align: center;
    }
    
    .day-trainings {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        margin-top: 2px;
    }
    
    .training-dot {
        width: 6px;
        height: 6px;
        margin: 1px;
    }
    
    /* Tooltip */
    .tooltip {
        z-index: 1090 !important;
    }
    
    /* Responsive buttons */
    .btn-group {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
    }
    
    .mobile-day-modal-content {
        width: 95%;
        padding: 15px;
    }
}