/*
 * Общие стили для административной панели
 * Соответствует трендам дизайна 2025 года
 */

:root {
    --bs-primary: #3a86ff;
    --bs-primary-rgb: 58, 134, 255;
    --bs-secondary: #6c757d;
    --bs-success: #10b981;
    --bs-success-rgb: 16, 185, 129;
    --bs-danger: #ef4444;
    --bs-warning: #f59e0b;
    --bs-info: #3b82f6;
    --bs-body-bg: #f8fafc;
    --bs-body-color: #111827;
}

body {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Общие стили компонентов */
.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
}

.btn {
    font-weight: 500;
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.form-control, .form-select {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border-color: #e5e7eb;
}

.form-control:focus, .form-select:focus {
    border-color: rgba(var(--bs-primary-rgb), 0.5);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.15);
}

.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

.badge-pill {
    border-radius: 50rem;
}

/* Макет страницы */
.page-header {
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.9), rgba(79, 70, 229, 0.9));
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 20px 20px;
}

/* Стили событий */
.event-grid .card-img-top {
    height: 180px;
    object-fit: cover;
}

.event-grid .event-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.event-grid .event-status {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.event-image {
    position: relative;
    overflow: hidden;
}

.event-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
}

.event-date {
    position: absolute;
    bottom: 10px;
    left: 10px;
    color: white;
    z-index: 2;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Фотографии */
.image-preview {
    width: 100%;
    height: 200px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 8px;
    border: 1px dashed #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #6c757d;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.image-preview.has-image span {
    display: none;
}

.image-preview input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Переключение между режимами отображения */
.view-toggle-btn.active {
    background-color: var(--bs-primary);
    color: white;
}

/* Кнопка клонирования ─ оранжевый outline */
.btn-outline-clone {
    color: #fd7e14;           /* текст и рамка */
    border-color: #fd7e14;
}
.btn-outline-clone:hover,
.btn-outline-clone:focus {
    color: #fff;              /* белый текст при ховере */
    background-color: #fd7e14;
}


/* Адаптивность */
@media (max-width: 768px) {
    .page-header {
        padding: 2rem 0;
    }

    .btn-stack {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .card-title {
        font-size: 1.25rem;
    }

    .hide-on-mobile {
        display: none;
    }
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    :root {
        --bs-body-bg: #0f172a;
        --bs-body-color: #f8fafc;
    }

    .card, .card-header {
        background-color: #1e293b;
        border-color: #334155;
    }

    .text-muted {
        color: #94a3b8 !important;
    }

    .form-control, .form-select {
        background-color: #1e293b;
        border-color: #334155;
        color: #f8fafc;
    }

    .form-check-input {
        background-color: #1e293b;
        border-color: #475569;
    }

    .image-preview {
        border-color: #334155;
        color: #94a3b8;
    }

    .table {
        color: #f8fafc;
    }

    .table-striped>tbody>tr:nth-of-type(odd)>* {
        background-color: rgba(255, 255, 255, 0.05);
        color: #f8fafc;
    }

    .dropdown-menu {
        background-color: #1e293b;
        border-color: #334155;
    }

    .dropdown-item {
        color: #f8fafc;
    }

    .dropdown-item:hover {
        background-color: #2d3748;
    }

    .alert-info {
        background-color: rgba(59, 130, 246, 0.2);
        border-color: rgba(59, 130, 246, 0.3);
        color: #93c5fd;
    }
}
