/* Hlavné štýly pre aplikáciu Dochádzka */

/* Normalizácia CSS pre rôzne prehliadače */
* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Základné štýly */
html {
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    color: #212529;
    line-height: 1.5;
}

/* Štýly pre hlavičku */
.navbar {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
}

.navbar-brand {
    font-weight: 600;
    display: flex;
    align-items: center;
}

.navbar-brand i, .navbar-brand svg {
    margin-right: 0.5rem;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: color 0.2s;
}

.navbar-nav .nav-link:hover {
    color: #0d6efd;
}

.navbar-nav .dropdown-menu {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.navbar-nav .dropdown-item {
    padding: 0.5rem 1.5rem;
    font-weight: 400;
}

.navbar-nav .dropdown-item:hover {
    background-color: #f8f9fa;
}

/* Štýly pre hlavný obsah */
main {
    flex: 1;
}

/* Štýly pre footer */
.footer {
    background-color: #f8f9fa;
    padding: 1rem 0;
    margin-top: auto;
    border-top: 1px solid #e9ecef;
}

/* Štýly pre karty */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.125);
    overflow: hidden;
}

.card-header {
    border-radius: 0 !important;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 0.75rem 1.25rem;
    font-weight: 500;
}

.card-body {
    padding: 1.25rem;
}

/* Štýly pre formuláre */
.form-control {
    border-radius: 0.25rem;
    border: 1px solid #ced4da;
    padding: 0.375rem 0.75rem;
    height: calc(1.5em + 0.75rem + 2px);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Štýly pre tlačidlá */
.btn {
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #bb2d3b;
    border-color: #b02a37;
}

/* Štýly pre tabuľky */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    border-top: none;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 500;
    vertical-align: bottom;
}

.table tbody + tbody {
    border-top: 2px solid #dee2e6;
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

/* Responzívne štýly */
@media (max-width: 992px) {
    .container {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .navbar-nav .dropdown-menu {
        position: absolute;
    }
}

@media (max-width: 768px) {
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .navbar-nav .dropdown-menu {
        position: static;
        float: none;
    }
    
    .day-cell {
        height: 60px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .day-cell {
        height: 50px;
        padding: 2px;
        font-size: 0.8rem;
    }
}

/* Štýly pre login */
.login-container {
    max-width: 400px;
    margin: 3rem auto;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Štýly pre dashboard */
.dashboard-stats .card {
    transition: transform 0.2s, box-shadow 0.2s;
}

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

/* Ikony vo formulároch */
.input-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

.form-group {
    position: relative;
    margin-bottom: 1rem;
}

/* Štýly pre kalendár */
.calendar-container {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    background-color: #fff;
}

.calendar-header {
    background-color: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-body {
    padding: 0.5rem;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
}

.calendar-table th {
    padding: 0.5rem;
    text-align: center;
    font-weight: 500;
    border-bottom: 1px solid #dee2e6;
}

.day-cell {
    height: 80px;
    vertical-align: top;
    padding: 5px;
    position: relative;
    border: 1px solid #dee2e6;
}

.day-number {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.day-cell.day-click {
    cursor: pointer;
}

.day-cell.day-click:hover {
    background-color: #e9ecef;
}

.day-cell.today {
    background-color: #e8f4ff;
}

.day-cell.weekend {
    background-color: #f8f9fa;
}

.day-cell.other-month {
    color: #6c757d;
    background-color: #f8f9fa;
}

.event-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 3px;
}

.event-item {
    font-size: 0.8rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 1px 3px;
    border-radius: 3px;
}

.day-number {
    font-weight: bold;
    display: inline-block;
}

.hours-worked {
    font-size: 0.8rem;
    color: #6c757d;
}

.today {
    background-color: #e8f4ff;
}

.weekend {
    background-color: #f8f9fa;
}

.holiday {
    background-color: #fff4e8;
}

.empty-day {
    background-color: #ffffff;
}

.holiday-name {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 5px;
}

/* Animácie pre notifikácie */
.alert {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
