/* ======== ОСНОВНОЕ ======== */

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #19191a;
    color: #ffffff;
}

h1:focus {
    outline: none;
}

label {
    color: #EBEBF599;
}

input, select, textarea, .form-control {
    background-color: #1c1c1c;
    color: #fff;
    border: 1px solid #454545;
}

input::placeholder {
    color: #EBEBF599;
}

a, .btn-link {
    color: #7878803D;
}

/* ======== ОСНОВНОЙ КОНТЕЙНЕР ======== */

.main-container {
    max-width: 960px;
    margin: 40px auto;
    padding: 30px;
    background-color: #1d1d1f;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #454545;
    transition: background-color 0.3s, box-shadow 0.3s;
}

/* ======== КАРТОЧКИ И UI ======== */

.card {
    background-color: #1c1c1c;
    border: 1px solid #454545;
    border-radius: 0px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

.card-header {
    background-color: #1a1a1a;
    color: #fff;
}

/* ======== КНОПКИ ======== */

.btn-clear-all {
    background-color: #7878803D;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-clear-all:hover {
    background-color: #78788052;
}

.btn-clear-all i {
    font-size: 1rem;
}

button, .btn {
    background-color: #7878803D;
    color: #ffffff;
    border: 1px solid #7878803D;
}

button:hover {
    background-color: #78788052;
}

button.btn-outline-secondary,
button.btn-outline-danger {
    line-height: 1;
    padding: 2px 6px;
    font-size: 0.9rem;
}

/* ======== DRAG AND DROP ======== */

.drop-zone {
    border: 2px dashed #7878803D;
    border-radius: 16px;
    padding: 40px 30px;
    background-color: #19191a;
    color: #dcdcdc;
    transition: background-color 0.3s, border-color 0.3s;
    cursor: pointer;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.drop-zone:hover {
    background-color: #2b2b2b;
    border-color: #454545;
}

.drop-zone i {
    color: #a1a1a1;
}

.drop-zone p {
    font-size: 18px;
    margin: 0;
    color: #bbbbbb;
}

.drop-zone input[type="file"] {
    opacity: 0;
    position: absolute;
    inset: 0;
    cursor: pointer;
}

/* ======== МОДАЛКИ ======== */

.modal-backdrop {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-window {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1c1c1c;
    color: #fff;
    border: 1px solid #454545;
    padding: 20px;
    border-radius: 12px;
    max-width: 600px;
    z-index: 1001;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

/* ======== ГАЛЕРЕЯ ИЗОБРАЖЕНИЙ ======== */

.image-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.image-option {
    position: relative;
    width: 100px;
    height: 130px;
    background-color: #1a1a1a;
    border: 1px solid #454545;
    border-radius: 8px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: transform 0.2s ease-in-out;
    cursor: pointer;
}

.image-option:hover {
    transform: scale(1.05);
    background-color: #1d1d1f;
}


.image-option img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 6px;
}


.caption {
    font-size: 0.8rem;
    color: #EBEBF599;
    text-align: center;
    line-height: 1.1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.item-count {
    font-size: 0.75rem;
    color: #ccc;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
}

.thumb {
    width: 85px;
    height: 85px;
    object-fit: contain;
    margin-right: 10px;
}

/* ======== ОШИБКИ (опционально) ======== */

.validation-message {
    color: red;
}


/* ======== Loader ======== */

.loading-progress{
    position:relative;width:8rem;height:8rem;margin:20vh auto 1rem auto
}
.loading-progress circle{
    fill:none;stroke:#454545;stroke-width:.6rem;transform-origin:50% 50%;
    animation:spin 1.4s linear infinite
}
@keyframes spin{to{transform:rotate(360deg)}}
.loading-progress-text{color:#EBEBF599;text-align:center;margin-top:.5rem}


/* ======== ПОЛЗУНКИ (SLIDERS) ======== */

.range-wrapper {
    width: 200px; 
    margin: 10px 0;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #454545;
    border-radius: 3px;
    outline: none;
    transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #7878803D;
    border: 2px solid #1c1c1c;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #EBEBF599;
    transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #7878803D;
    border: 2px solid #1c1c1c;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

input[type="range"]::-moz-range-thumb:hover {
    background: #EBEBF599;
    transform: scale(1.2);
}

input[type="range"]::-moz-range-track {
    background: #454545;
    height: 6px;
    border-radius: 3px;
}


/* ======== ГРУППЫ ФОРМЫ ======== */

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.form-group label {
    margin-bottom: 6px;
    color: #EBEBF599;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Общие поля ввода */
.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    padding: 8px 10px;
    background-color: #1c1c1c;
    border: 1px solid #454545;
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #7878803D;
    outline: none;
}

/* ======== ПОЛЗУНКИ В КОНТЕКСТЕ ======== */

.form-group input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #454545;
    border-radius: 3px;
    outline: none;
    transition: background 0.3s;
    margin-top: 4px;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #7878803D;
    border: 2px solid #1c1c1c;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.form-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #EBEBF599;
    transform: scale(1.2);
}

/* Firefox */
.form-group input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #7878803D;
    border: 2px solid #1c1c1c;
    border-radius: 50%;
    cursor: pointer;
}

/* ======== КНОПКА СКАЧАТЬ JSON ======== */
.btn-download {
    position: relative;
    overflow: hidden;
    padding: 10px 20px;
    font-size: 1rem;
    background-color: #136f28;
    color: #fff;
    border: none;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.btn-download:hover {
    background-color: #218838;
}

.btn-download .text,
.btn-download .icon {
    display: inline-block;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.btn-download .icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    font-size: 1.2rem;
}

.btn-download:hover .text {
    opacity: 0;
    transform: translateY(-10px);
}

.btn-download:hover .icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.btn-download {
    position: relative;
    overflow: hidden;
    padding: 10px 20px;
    font-size: 1rem;
    background-color: #136f28;
    color: #fff;
    border: none;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.btn-download:hover {
    background-color: #218838;
}

.btn-download .text,
.btn-download .icon {
    display: inline-block;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.btn-download .icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    font-size: 1.2rem;
}

.btn-download:hover .text {
    opacity: 0;
    transform: translateY(-10px);
}

.btn-download:hover .icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ======== КНОПКА С ПЕРЕВОДАМИ ======== */
.language-switcher {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.btn-lang {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    background-color: #1c1c1c;
    color: #fff;
    border: 1px solid #454545;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-lang .fi {
    font-size: 1.2rem;
    line-height: 1;
}

.btn-lang:hover {
    background-color: #1d1d1f;
    transform: translateY(-1px);
}

.btn-lang.active {
    background-color: #7878803D;
    color: #ffffff;
    font-weight: 600;
    border-color: #7878803D;
}

/* ==== CUSTOM SCROLLBAR ==== */
* {
    scrollbar-width: thin;
    scrollbar-color: #666 #1c1c1c;
}

*::-webkit-scrollbar {
    width: 8px;
}

*::-webkit-scrollbar-track {
    background: #000000;
}

*::-webkit-scrollbar-thumb {
    background-color: #7878803D;
    border-radius: 10px;
    border: 2px solid #000000;
}

/* ======== CHECKBOX ======== */
.fa-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 18px;
    color: #f0f0f0;
}

.fa-checkbox input[type="checkbox"] {
    display: none;
}

.fa-checkbox .icon-box {
    position: relative;
    width: 20px;
    height: 20px;
}

.fa-checkbox .icon-box i {
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.2s ease;
    font-size: 20px;
    color: #4caf50;
}

.fa-checkbox .checked {
    opacity: 0;
}

.fa-checkbox input[type="checkbox"]:checked + .icon-box .checked {
    opacity: 1;
}

.fa-checkbox input[type="checkbox"]:checked + .icon-box .unchecked {
    opacity: 0;
}


/* ======== СОЦИАЛКИ ======== */
.contact-link {
    font-size: 1.5rem;
    color: #EBEBF599;
    transition: color 0.3s;
}

.contact-link:hover {
    color: #fff;
}

/* ======== MEME ======== */
.corner-image {
    position: fixed;
    bottom: 10px; 
    left: 10px;   
    width: 80px;
    height: auto;
    z-index: 9999;
    opacity: 0.9;
    pointer-events: none;
}

.corner-image {
    position: fixed;
    bottom: 10px;
    left: 10px;
    width: 80px;
    height: auto;
    z-index: 9999;
    
    pointer-events: auto;    
    cursor: pointer;         
    opacity: 0.9;
}


/* ==== МОДАЛКИ: bigger & scrollable ==== */

.modal-window h6.category-title {
    position: sticky;
    top: 0;
    background: #1c1c1c;
    padding: 6px 4px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff; 
    z-index: 1;
    margin-bottom: 10px;
}

.modal-window {
    width: 96%;
    max-width: 1200px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 30px 35px;
    border-radius: 18px;
    background-color: #1c1c1c;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.modal-window h6.text-info{
    position: sticky;
    top: 0;
    background:#1c1c1c;    
    padding:4px 0;
    z-index:1;
}

.image-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(90px,1fr));
    gap: 18px;
    margin-bottom: 12px;
}


/* ======== УДАЛЕНИЕ МУСОРА ======== */

.blazor-error-ui {
    display: none !important;
}

input.form-control:focus,
.form-control:focus {
    background-color: #1c1c1c; 
    color: #fff;               
    border-color: #7878803D;     
    outline: none;             
    box-shadow: none;       
}

/* Chrome, Safari, Edge */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}


/* ======== МОДАЛКА : ПОИСК ======== */
/* ---------- Поисковый инпут в модалке ---------- */
.modal-window .modal-search-wrapper {
    position: relative;
}

.modal-window .modal-search-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;        
    font-size: 0.9rem;
}

/* сам input */
.modal-window .modal-search-wrapper .form-control {
    padding-left: 2.2rem;        
    background: #1c1c1c;
    color: #fff;
    border: 1px solid #454545;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.modal-window .modal-search-wrapper .form-control:focus {
    background: #1c1c1c;
    color: #fff;
    border-color: #7878803D;
    box-shadow: 0 0 0 2px rgba(128,179,255,0.25);
    outline: none;
}



/* ======== МОДАЛКА : ФОТКИ ======== */
.image-option {
    text-align: center;
    cursor: pointer;
    background-color: #1a1a1a;
    border: 1px solid #454545;
    transition: transform 0.2s ease-in-out;
    padding: 8px;
    border-radius: 8px;
    width: 100px;           
    height: 130px;          
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.image-option:hover {
    transform: scale(1.05);
    background-color: #1d1d1f;
}

.image-option img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.caption {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #EBEBF599;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
}

.image-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    justify-content: center;
    padding-bottom: 10px;
}


/* ======== КНОПКА: ОТМЕНА МОДАЛКИ ======== */
.btn-cancel {
    position: relative;
    overflow: hidden;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    background-color: #7878803D; 
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 160px;
    height: 42px;
}

.btn-cancel:hover {
    background-color: #bd2130;
}

.btn-cancel .text,
.btn-cancel .icon {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.btn-cancel .icon {
    opacity: 0;
    transform: translateY(10px);
}

.btn-cancel:hover .text {
    opacity: 0;
    transform: translateY(-10px);
}

.btn-cancel:hover .icon {
    opacity: 1;
    transform: translateY(0);
}

.btn-cancel .icon i {
    font-size: 1.2rem;
}



/* ======== КНОПКА: ДОБАВИТЬ ВЫБОР ИЗ МОДАЛКИ ======== */
.btn-select {
    position: relative;
    overflow: hidden;

    padding: 6px 14px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff;
    background-color: #244f7d;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;

    height: 38px;            
    min-width: 160px;
    line-height: 1;
}

.btn-select:hover {
    background-color: #316aa5;
}

.btn-select .text,
.btn-select .icon {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.btn-select .icon {
    opacity: 0;
    transform: translateY(10px);
}

.btn-select:hover .text {
    opacity: 0;
    transform: translateY(-10px);
}

.btn-select:hover .icon {
    opacity: 1;
    transform: translateY(0);
}

.btn-select .icon i {
    font-size: 1rem;
}
/* ======== Блок с контентом (Content Section) ======== */
.form-control.me-2.p-2.mb-2 {
    background-color: #1c1c1c; /
    border: 1px solid #454545; 
    border-radius: 8px; 
    color: #fff; 
    padding: 12px 20px; 
    margin-bottom: 16px; 
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.form-control.me-2.p-2.mb-2 .btn-select {
    background-color: #244f7d; 
    color: #fff;
    padding: 6px 12px;
    font-size: 0.95rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-left: 10px;
}

.form-control.me-2.p-2.mb-2 .btn-select:hover {
    background-color: #316aa5; 
}

.form-control.me-2.p-2.mb-2 .icon-btn.icon-btn-delete {
    color: #fff;
    font-size: 1.2rem;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: absolute;
    top: 12px;
    right: 12px;
}

/* ======== МОДАЛКА: Стилизация окна модалки ======== */
.modal-window {
    max-height: 88vh; 
    width: 100%; 
    max-width: 1200px; 
    padding: 30px 35px;
    border-radius: 18px;
    background-color: #1c1c1c;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    transition: all 0.3s ease;
}

.modal-window h6.category-title {
    position: sticky;
    top: 0;
    background: #1c1c1c;
    padding: 6px 4px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    z-index: 1;
    margin-bottom: 10px;
}
.btn-lang-large {
    padding: 16px 28px;
    font-size: 1.2rem;
}

.btn-lang-large img {
    width: 28px;
    height: 28px;
    margin-right: 8px;
}
.image-option {
    width: 96px;
    text-align: center;
    margin: 5px;
}

.image-option img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.caption {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.2;
}

.item-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-count {
    color: #6c757d;
    font-size: 13px;
}

.auth-alert {
    max-width: 500px;
    margin-top: 25px;
    padding: 16px 20px;
    background-color: #291717;
    color: #ffbbbb;
    border: 1px solid #ff5c5c;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.2);
    text-align: left;
}

.modal-window .modal-search-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.modal-window .modal-search-wrapper .form-control {
    padding-left: 30px; 
    background: #1c1c1c;
    color: #fff;
    border: 1px solid #454545;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.modal-window .modal-search-wrapper .form-control:focus {
    background: #1c1c1c;
    color: #fff;
    border-color: #7878803D;
    box-shadow: 0 0 0 2px rgba(128,179,255,0.25);
    outline: none;
}

.modal-window .modal-search-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 1rem;
    pointer-events: none;
}

/* ======== КНОПКА: ДОБАВИТЬ PRESET ======== */

.btn-add {
    --bg: #244f7d;
    --bg-dark: #316aa5;

    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 200px;
    height: 42px;

    padding: 0 20px;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    background: var(--bg);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,.2);
    overflow: hidden;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-add:hover {
    background: var(--bg-dark);
}

.btn-add .text,
.btn-add .icon {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.btn-add .icon {
    opacity: 0;
    transform: translateY(10px);
}

.btn-add:hover .text {
    opacity: 0;
    transform: translateY(-10px);
}

.btn-add:hover .icon {
    opacity: 1;
    transform: translateY(0);
}

.btn-add .icon i {
    font-size: 1.2rem;
}


