/* Modern Theme - Additional Styles */

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

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

/* Apply animations */
main {
    animation: fadeIn 0.3s ease-out;
}

.product-card {
    animation: fadeIn 0.3s ease-out;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Additional utility classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.rounded {
    border-radius: 8px;
}

.shadow {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.shadow-lg {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.border {
    border: 1px solid #e2e8f0;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-75 {
    opacity: 0.75;
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-primary {
    background-color: #dbeafe;
    color: #0c2340;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background-color: #fee2e2;
    color: #7f1d1d;
}

.badge-warning {
    background-color: #fef3c7;
    color: #78350f;
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

table th {
    background-color: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
}

table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

table tbody tr:hover {
    background-color: #f8fafc;
}

/* Card component */
.card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
}

.modal-close:hover {
    color: #1e293b;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    color: #cbd5e1;
}

.breadcrumb .active {
    color: #64748b;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-decoration: none;
    color: #2563eb;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #dbeafe;
}

.pagination .active {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
}

.pagination .disabled {
    color: #cbd5e1;
    cursor: not-allowed;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #1e293b;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */
.breadcrumb {
    margin: 0 0 1.25rem;
}

.breadcrumb-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: .84rem;
    line-height: 1.4;
    counter-reset: none !important;
}

.breadcrumb-list li {
    list-style: none !important;
    counter-increment: none !important;
}

.breadcrumb-list li::marker {
    content: none !important;
    display: none !important;
}

/* Роздільник через ::before */
.breadcrumb-item + .breadcrumb-item::before {
    content: '›';
    display: inline-block;
    margin: 0 .4rem;
    color: #b0bec5;
    font-size: 1rem;
    line-height: 1;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    white-space: nowrap;
}

.breadcrumb-item a {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: #64748b;
    text-decoration: none;
    transition: color .15s;
}

.breadcrumb-item a:hover {
    color: var(--color-primary, #3b82f6);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.breadcrumb-item a .fa-home {
    font-size: .8rem;
}

.breadcrumb-item--current {
    color: #1e293b;
    font-weight: 500;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640px) {
    .breadcrumb-list { font-size: .78rem; }
    .breadcrumb-item--current { max-width: 160px; }
}

/* ── Profile Layout ──────────────────────────────────────────────────────────── */
.profile-layout {
    display: flex !important;
    gap: 2rem !important;
    align-items: flex-start !important;
}

.profile-sidebar {
    flex: 0 0 250px !important;
    min-width: 250px !important;
}

.profile-card {
    flex: 1 !important;
    min-width: 0 !important;
}

.profile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: #64748b;
    transition: all 0.2s;
    background: white;
    border: 1px solid #e2e8f0;
}

.profile-nav .nav-link:hover {
    background-color: #f8fafc;
    color: #2563eb;
    border-color: #cbd5e1;
}

.profile-nav .nav-link.active {
    background-color: #dbeafe;
    color: #2563eb;
    font-weight: 500;
    border-color: #93c5fd;
}

@media (max-width: 768px) {
    .profile-layout {
        flex-direction: column;
    }

    .profile-sidebar {
        flex: none;
        min-width: 100%;
    }
}
