/* similar.css - ВСЕ СТИЛИ ДЛЯ SIMILAR МОДУЛЯ */

.taxonomy-description .fa , .taxonomy-description .fas {
    margin-right: 7px;
}

/* Карточки похожих игр */
.similar-game-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.2);
}

.similar-game-item:last-child {
    border-bottom: none;
}

/* Блок голосования */
.voting-section {
    margin-top: 0;
    padding-top: 12px;
    clear: both;
    z-index: 999;
    position: relative;
}

.interactive-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.dark-skin .interactive-buttons {
    background: #26282c;
}

.similar-votes {
    margin-bottom: 15px;
    font-size: 14px;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.dark-skin .similar-votes {
    background: #36373a;
    border-color: #36373a;
}

.similar-votes i {
    color: #6c757d;
    margin-right: 5px;
}

.like-count {
    color: #28a745;
    font-weight: bold;
}

.dislike-count {
    color: #dc3545;
    font-weight: bold;
}

/* Кнопки голосования */
.vote-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    width: 100%;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    max-width: 200px;
}

.btn-success {
    background: #28a745;
    color: white;
    border: 1px #28a745;
}

.btn-success:hover {
    background: #218838;
    border-color: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(var(--brand-rgb, 40, 167, 69), 0.3);
}

.btn-success.active {
    background: #155724;
    border: 2px solid #28a745;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-danger.active {
    background: #721c24;
    border: 2px solid #dc3545;
}

.btn-primary {
    background: var(--brand-color, #007bff);
    color: white;
    border: 1px solid var(--brand-color, #007bff);
}

.btn-primary:hover {
    background: var(--brand-hover, #0056b3);
    border-color: var(--brand-hover, #0056b3);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(var(--brand-rgb, 0, 123, 255), 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: 1px solid #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Модальное окно */
#similar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

#similar-modal.open {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

#similar-modal.open .modal-content {
    transform: translateY(0);
}

.dark-skin .modal-content {
    background: #2c2e33;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.dark-skin .modal-header {
    border-bottom-color: #404040;
}

.modal-header h2 {
    margin: 0;
    color: #343a40;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dark-skin .modal-header h2 {
    color: #f8f9fa;
}

.modal-header h2 i {
    color: var(--brand-color);
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-modal:hover {
    background: #f8f9fa;
    color: #343a40;
}

.dark-skin .close-modal {
    color: #adb5bd;
}

.dark-skin .close-modal:hover {
    background: #404040;
    color: #f8f9fa;
}

/* Форма добавления */
.addtext {
    margin-bottom: 20px;
    color: #495057;
    line-height: 1.5;
    font-size: 15px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid var(--brand-color);
}

.dark-skin .addtext {
    color: #adb5bd;
    background: #36373a;
    border-left-color: var(--brand-color);
}

.addtext b {
    color: var(--brand-color);
}

/* Поле поиска */
.inputparent {
    position: relative;
    margin-bottom: 15px;
}

.niceinput.input2 {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    background: white;
    color: #333;
}

.niceinput.input2:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.dark-skin .niceinput.input2 {
    background: #36373a;
    border-color: #495057;
    color: #f8f9fa;
}

/* Результаты поиска */
#similar-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-top: 2px;
    display: none;
}

.dark-skin #similar-search-results {
    background: #2c2e33;
    border-color: #495057;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.search-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    display: flex;
    align-items: center;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--brand-color);
    color: white;
    padding-left: 20px;
}

.dark-skin .search-result-item {
    border-bottom-color: #404040;
    color: #f8f9fa;
}

.dark-skin .search-result-item:hover {
    background: var(--brand-color);
}

/* Выбранные игры */
#similar-chosen-games {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    display: none;
}

.dark-skin #similar-chosen-games {
    background: #36373a;
    border-color: #404040;
}

#similar-chosen-games span {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #495057;
}

.ask_pop_up_tag_item {
    display: inline-block;
    background: var(--brand-color);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    margin-right: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.ask_pop_up_tag_item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

.ask_pop_up_tag_item a {
    color: white;
    margin-left: 8px;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.ask_pop_up_tag_item a:hover {
    opacity: 1;
}

/* Поле пояснения */
.similar_explain {
    margin: 20px 0;
    display: none;
}

.nicetextarea.input2 {
    width: 100%;
    padding: 12px 15px;
    /*border: 1px solid #ced4da;*/
    border-radius: 4px;
    font-size: 14px;
    min-height: 100px;
    resize: vertical;
    box-sizing: border-box;
    transition: all 0.2s ease;
    /*background: white;*/
    color: #333;
}

/* Кнопки модального окна */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.dark-skin .modal-actions {
    border-top-color: #404040;
}

.modal-actions .btn {
    min-width: 120px;
    flex: none;
}

/* Стили для confirm диалога */
.confirm-dialog {
    background: rgba(0,0,0,0.5);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.confirm-dialog-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.confirm-dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Стили для диалога подтверждения */
.confirm-dialog-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.confirm-dialog-modal.show {
    opacity: 1;
    visibility: visible;
}

.confirm-dialog-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
}

.confirm-dialog-modal.show .confirm-dialog-content {
    transform: translateY(0);
    opacity: 1;
}

.confirm-dialog-header {
    padding: 20px 20px 10px;
    border-bottom: 1px solid #eee;
}

.confirm-dialog-header h3 {
    margin: 0;
    font-size: 18px;
    color: #e74c3c;
    display: flex;
    align-items: center;
    gap: 10px;
}

.confirm-dialog-header .fa {
    font-size: 20px;
}

.confirm-dialog-body {
    padding: 20px;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
}

.confirm-dialog-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.confirm-dialog-footer .btn {
    padding: 8px 20px;
    font-size: 14px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-dialog-footer .btn-secondary {
    background: #6c757d;
    color: white;
}

.confirm-dialog-footer .btn-secondary:hover {
    background: #5a6268;
}

.confirm-dialog-footer .btn-primary {
    /*background: #007bff;
    color: white;*/
}

.confirm-dialog-footer .btn-primary:hover {
    /*background: #0069d9;*/
}

.dark-skin .confirm-dialog-content {
    background: #2c2e33;
}

.dark-skin .confirm-dialog-header {
    border-bottom-color: #444;
}

.dark-skin .confirm-dialog-header h3 {
    color: #e74c3c;
}

.dark-skin .confirm-dialog-body {
    color: #e9ecef;
}

.dark-skin .confirm-dialog-footer {
    border-top-color: #444;
}

.dark-skin .confirm-dialog-footer .btn-secondary {
    background: #5a6268;
}

.dark-skin .confirm-dialog-footer .btn-primary {
    background: #0062cc;
}

/* Добавляем анимацию для спиннера */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Дополнительные стили для кнопок голосования */
.vote-animate {
    animation: pulse 0.3s ease;
}

.interactive-animate {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Дополнительные адаптивные стили */
@media (max-width: 480px) {
    .confirm-dialog-content {
        max-width: 90%;
    }
    
    .confirm-dialog-footer {
        flex-direction: column;
    }
    
    .confirm-dialog-footer .btn {
        width: 100%;
    }
}

/* Анимации */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.vote-animate {
    animation: pulse 0.3s ease;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Адаптивность */
@media (max-width: 768px) {
    .vote-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        max-width: none;
    }
    
    .modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions button {
        width: 100%;
    }
    
    .ask_pop_up_tag_item {
        display: block;
        margin-right: 0;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
}