/* =============================================
 * COMPONENTS STYLES
 * =============================================
 * Subor: assets/css/core/components.css
 * Zodpovednosť: Štýly pre opakovane použiteľné komponenty
 * Verzia: 3.0.0 (Opravený security-badge - vľavo dole)
 * ============================================= */

/* =============================================
 * BUTTONS
 * ============================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.7s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    font-size: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, #1a2b6e, #2a3f9e);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #545b62);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.btn-light {
    background: linear-gradient(135deg, #f8f9fa, #e2e6ea);
    color: #212529;
}

.btn-dark {
    background: linear-gradient(135deg, #343a40, #23272b);
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* =============================================
 * NOTIFIKÁCIE - PROFESIONÁLNE SLIDE-IN Z PRAVA
 * ============================================= */

/* Kontajner pre notifikácie */
#notificationContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none;
    max-width: 380px;
    width: 100%;
}

/* Jednotlivá notifikácia */
.notification {
    padding: 16px 20px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 380px;
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);

    /* Slide-in z prava */
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                opacity 0.3s ease;
}

/* Notifikácia po zobrazení */
.notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* Notifikácia pri odchode */
.notification.hide {
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s ease-in, opacity 0.2s ease;
}

/* Typy notifikácií s farebným odlíšením */
.notification.success {
    background: linear-gradient(135deg, #27ae60, #219653);
    border-left: 4px solid rgba(255, 255, 255, 0.8);
}

.notification.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-left: 4px solid rgba(255, 255, 255, 0.8);
}

.notification.warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border-left: 4px solid rgba(255, 255, 255, 0.8);
}

.notification.info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-left: 4px solid rgba(255, 255, 255, 0.8);
}

/* Ikona v notifikácii */
.notification-icon {
    font-size: 24px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Text notifikácie */
.notification-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    letter-spacing: 0.3px;
}

/* Zatváracie tlačidlo */
.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0 8px;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
    flex-shrink: 0;
    line-height: 1;
    font-weight: bold;
}

.notification-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Progress bar pre automatické zatváranie */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    width: 100%;
    transform-origin: left;
    animation: progress linear forwards;
}

@keyframes progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* =============================================
 * CARDS
 * ============================================= */

.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid #eaeff5;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: #d0d9ff;
}

.card-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e7ff;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a2b6e;
    margin: 0;
}

.card-body {
    margin-bottom: 20px;
}

.card-footer {
    padding-top: 15px;
    border-top: 1px solid #e0e7ff;
}

/* Varianty kariet */
.card-primary {
    border-top: 4px solid #1a2b6e;
}

.card-success {
    border-top: 4px solid #28a745;
}

.card-warning {
    border-top: 4px solid #ffc107;
}

.card-danger {
    border-top: 4px solid #dc3545;
}

.card-info {
    border-top: 4px solid #17a2b8;
}

/* =============================================
 * ALERTS
 * ============================================= */

.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid transparent;
    animation: slideInUp 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background-color: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.alert-success .alert-icon {
    color: #28a745;
}

.alert-warning {
    background-color: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.alert-warning .alert-icon {
    color: #ffc107;
}

.alert-error,
.alert-danger {
    background-color: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.alert-error .alert-icon,
.alert-danger .alert-icon {
    color: #dc3545;
}

.alert-info {
    background-color: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

.alert-info .alert-icon {
    color: #17a2b8;
}

.alert-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 700;
    margin-bottom: 5px;
}

.alert-message {
    font-size: 14px;
}

.alert-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.alert-close:hover {
    opacity: 1;
}

/* =============================================
 * BADGES
 * ============================================= */

.badge {
    display: inline-block;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

.badge-primary {
    background: #1a2b6e;
    color: white;
}

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

.badge-warning {
    background: #ffc107;
    color: #212529;
}

.badge-danger {
    background: #dc3545;
    color: white;
}

.badge-info {
    background: #17a2b8;
    color: white;
}

.badge-light {
    background: #f8f9fa;
    color: #212529;
}

.badge-dark {
    background: #343a40;
    color: white;
}

.badge-outline-primary {
    background: transparent;
    border: 1px solid #1a2b6e;
    color: #1a2b6e;
}

.badge-outline-success {
    background: transparent;
    border: 1px solid #28a745;
    color: #28a745;
}

.badge-outline-warning {
    background: transparent;
    border: 1px solid #ffc107;
    color: #856404;
}

.badge-outline-danger {
    background: transparent;
    border: 1px solid #dc3545;
    color: #dc3545;
}

.badge-pill {
    border-radius: 50px;
    padding: 5px 12px;
}

/* =============================================
 * LOADERS
 * ============================================= */

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1a2b6e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.loader-lg {
    width: 60px;
    height: 60px;
    border-width: 5px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dotted loader */
.loader-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.loader-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1a2b6e;
    animation: dots 1.4s infinite ease-in-out both;
}

.loader-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loader-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dots {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =============================================
 * MODALS
 * ============================================= */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    animation: modalSlideIn 0.3s ease;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e0e7ff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.3s;
    line-height: 1;
}

.modal-close:hover {
    color: #dc3545;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e0e7ff;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal veľkosti */
.modal-sm .modal-content {
    max-width: 300px;
}

.modal-lg .modal-content {
    max-width: 800px;
}

.modal-xl .modal-content {
    max-width: 1140px;
}

.modal-full .modal-content {
    max-width: none;
    width: 100%;
    height: 100%;
    border-radius: 0;
}

/* =============================================
 * TOOLTIPS
 * ============================================= */

.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    pointer-events: none;
}

.tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
    margin-bottom: -4px;
    pointer-events: none;
}

/* Varianty tooltipov */
.tooltip-right:hover::after {
    left: 100%;
    bottom: 50%;
    transform: translateY(50%);
    margin-left: 8px;
    margin-bottom: 0;
}

.tooltip-right:hover::before {
    left: 100%;
    bottom: 50%;
    transform: translateY(50%) rotate(-90deg);
    margin-left: -4px;
    margin-bottom: 0;
}

.tooltip-left:hover::after {
    left: auto;
    right: 100%;
    bottom: 50%;
    transform: translateY(50%);
    margin-right: 8px;
    margin-bottom: 0;
}

.tooltip-left:hover::before {
    left: auto;
    right: 100%;
    bottom: 50%;
    transform: translateY(50%) rotate(90deg);
    margin-right: -4px;
    margin-bottom: 0;
}

.tooltip-bottom:hover::after {
    bottom: auto;
    top: 100%;
    margin-top: 8px;
    margin-bottom: 0;
}

.tooltip-bottom:hover::before {
    bottom: auto;
    top: 100%;
    border-top-color: transparent;
    border-bottom-color: #333;
    margin-top: -12px;
    margin-bottom: 0;
}

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

.pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.page-item {
    list-style: none;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: white;
    color: #1a2b6e;
    font-weight: 600;
    transition: all 0.3s;
    border: 1px solid #e0e7ff;
    cursor: pointer;
}

.page-link:hover,
.page-item.active .page-link {
    background: #1a2b6e;
    color: white;
    border-color: #1a2b6e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 43, 110, 0.2);
}

.page-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.page-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #6c757d;
}

/* Veľkosti paginácie */
.pagination-sm .page-link {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

.pagination-lg .page-link {
    width: 48px;
    height: 48px;
    font-size: 16px;
}

/* =============================================
 * TABLES
 * ============================================= */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.table th {
    background: #f8f9fa;
    color: #1a2b6e;
    font-weight: 600;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid #e0e7ff;
}

.table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eaeff5;
}

.table tbody tr:hover {
    background: #f5f8ff;
}

.table-striped tbody tr:nth-child(even) {
    background: #f8f9fa;
}

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

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

.table-sm th,
.table-sm td {
    padding: 8px 10px;
}

/* =============================================
 * FORMS
 * ============================================= */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e2a47;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    border: 2px solid #eaeff5;
    border-radius: 8px;
    transition: all 0.3s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #1a2b6e;
    box-shadow: 0 0 0 3px rgba(26, 43, 110, 0.1);
}

.form-control.is-valid {
    border-color: #28a745;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.form-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    font-size: 14px;
}

/* =============================================
 * 🔥 SECURITY BADGE - V ĽAVEJ PÄTIČKE STRÁNKY (OPRAVENÉ)
 * ============================================= */

.security-badge {
    position: fixed;
    bottom: 20px;
    left: 20px;  /* 🔥 ZMENENÉ: pôvodne bolo right: 20px */
    background: rgba(26, 43, 110, 0.9);
    color: white;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    z-index: 9999;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    pointer-events: none;  /* Neruší kliknutie na odkazy */
    animation: securityBadgeFadeIn 0.5s ease;
}

.security-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(26, 43, 110, 0.6);
    background: rgba(26, 43, 110, 0.95);
}

.security-badge i {
    font-size: 16px;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
}

@keyframes securityBadgeFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responzívne úpravy pre ľavú stranu */
@media (max-width: 768px) {
    .security-badge {
        bottom: 15px;
        left: 15px;
        padding: 8px 14px;
        font-size: 12px;
    }

    .security-badge i {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .security-badge {
        bottom: 10px;
        left: 10px;
        padding: 6px 12px;
        font-size: 11px;
    }

    .security-badge i {
        font-size: 12px;
    }
}

@media print {
    .security-badge {
        display: none !important;
    }
}

/* =============================================
 * ANIMATIONS
 * ============================================= */

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

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

@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* =============================================
 * RESPONZÍVNE ÚPRAVY PRE NOTIFIKÁCIE
 * ============================================= */

@media (max-width: 768px) {
    #notificationContainer {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        align-items: stretch;
    }

    .notification {
        max-width: none;
        padding: 14px 16px;
    }

    .notification-icon {
        font-size: 20px;
    }

    .notification-text {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .notification {
        padding: 12px 14px;
    }

    .notification-icon {
        font-size: 18px;
    }

    .notification-close {
        font-size: 16px;
        padding: 0 4px;
    }
}
