/* noxsettings.css - Nox Messenger Settings Styles */

/* Модальное окно настроек */
.nox-settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.nox-settings-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    background: #1a1a2e;
    border: 2px solid #40E0D0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: nox-slide-in 0.3s ease-out;
}

@keyframes nox-slide-in {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Заголовок модального окна */
.nox-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    border-bottom: 1px solid rgba(64, 224, 208, 0.3);
}

.nox-settings-header h2 {
    margin: 0;
    color: #40E0D0;
    font-size: 22px;
    text-shadow: 0 0 10px rgba(64, 224, 208, 0.5);
}

.nox-settings-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(64, 224, 208, 0.5);
    color: #40E0D0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.nox-settings-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Меню настроек */
.nox-settings-menu {
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.nox-settings-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.nox-settings-item:hover {
    background: rgba(64, 224, 208, 0.1);
}

.nox-settings-item:active {
    background: rgba(64, 224, 208, 0.2);
}

.nox-settings-icon {
    font-size: 22px;
    margin-right: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(64, 224, 208, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(64, 224, 208, 0.3);
}

.nox-settings-title {
    flex: 1;
    color: white;
    font-size: 16px;
    font-weight: 500;
}

.nox-settings-subtitle {
    color: #888;
    font-size: 13px;
    margin-left: 10px;
}

.nox-settings-arrow {
    color: #40E0D0;
    font-size: 20px;
    margin-left: 10px;
}

/* Панель настроек */
.nox-settings-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10001;
    backdrop-filter: blur(5px);
}

.nox-settings-panel-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 450px;
    max-height: 80vh;
    background: #1a1a2e;
    border: 2px solid #40E0D0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: nox-slide-in 0.3s ease-out;
}

.nox-settings-panel-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    border-bottom: 1px solid rgba(64, 224, 208, 0.3);
}

.nox-settings-back {
    background: transparent;
    border: none;
    color: #40E0D0;
    font-size: 16px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nox-settings-back:hover {
    background: rgba(64, 224, 208, 0.1);
}

#nox-panel-title {
    flex: 1;
    margin: 0 15px;
    color: #40E0D0;
    font-size: 18px;
    text-align: center;
}

.nox-settings-panel-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(64, 224, 208, 0.5);
    color: #40E0D0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.nox-settings-panel-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.nox-settings-panel-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 70px);
}

/* Секции настроек */
.nox-settings-section {
    color: white;
}

.nox-setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nox-setting-row:last-child {
    border-bottom: none;
}

.nox-setting-label {
    flex: 1;
    color: white;
    font-size: 15px;
}

/* Переключатель */
.nox-switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 28px;
}

.nox-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.nox-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 34px;
    border: 1px solid #555;
}

.nox-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .nox-slider {
    background-color: #40E0D0;
}

input:checked + .nox-slider:before {
    transform: translateX(26px);
}

/* Кнопки */
.nox-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.nox-btn-secondary {
    background: rgba(64, 224, 208, 0.2);
    color: #40E0D0;
    border: 1px solid rgba(64, 224, 208, 0.5);
}

.nox-btn-secondary:hover {
    background: rgba(64, 224, 208, 0.3);
}

.nox-btn-danger {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.5);
}

.nox-btn-danger:hover {
    background: rgba(255, 107, 107, 0.3);
}

.nox-btn-test {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.5);
    margin: 0 5px;
}

.nox-btn-test:hover {
    background: rgba(0, 255, 136, 0.3);
}

/* Загрузка файлов */
.nox-file-upload {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nox-file-name {
    color: #888;
    font-size: 14px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Статус сообщения */
.nox-status-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    display: none;
}

.nox-status-message.success {
    display: block;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #00ff88;
}

.nox-status-message.error {
    display: block;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.nox-status-message.info {
    display: block;
    background: rgba(64, 224, 208, 0.1);
    border: 1px solid rgba(64, 224, 208, 0.3);
    color: #40E0D0;
}

.nox-status-message.loading {
    display: block;
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    color: #FFA500;
}

/* Опции подключения */
.nox-connection-options {
    margin-top: 15px;
}

.nox-connection-option {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nox-connection-icon {
    font-size: 20px;
    margin-right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.nox-connection-name {
    flex: 1;
    color: white;
    font-size: 14px;
}

.nox-connection-status {
    color: #888;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}

.nox-connection-option:nth-child(3) .nox-connection-status {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
}

/* Опции тем */
.nox-theme-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.nox-theme-option {
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
}

.nox-theme-option:hover {
    background: rgba(64, 224, 208, 0.1);
    border-color: rgba(64, 224, 208, 0.3);
}

.nox-theme-preview {
    width: 100%;
    height: 80px;
    border-radius: 6px;
    margin-bottom: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nox-theme-name {
    color: white;
    font-size: 12px;
    text-align: center;
    margin-bottom: 4px;
}

.nox-theme-badge {
    font-size: 10px;
    text-align: center;
    color: #40E0D0;
    background: rgba(64, 224, 208, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.nox-theme-option[data-theme="dark"] .nox-theme-badge {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
}

/* Опции безопасности и контактов */
.nox-security-options,
.nox-contacts-options {
    margin-top: 15px;
}

.nox-security-option,
.nox-contacts-option {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nox-security-icon,
.nox-contacts-icon {
    font-size: 20px;
    margin-right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.nox-security-info,
.nox-contacts-info {
    flex: 1;
}

.nox-security-name,
.nox-contacts-name {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.nox-security-desc,
.nox-contacts-desc {
    color: #888;
    font-size: 12px;
    margin-top: 2px;
}

.nox-security-status,
.nox-contacts-status {
    color: #888;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}

.nox-security-option:nth-child(3) .nox-security-status {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
}

.nox-contacts-option:nth-child(3) .nox-contacts-status {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
}

/* Прокрутка */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(64, 224, 208, 0.5);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(64, 224, 208, 0.8);
}

/* Мобильная адаптация */
@media (max-width: 480px) {
    .nox-settings-content,
    .nox-settings-panel-content {
        width: 95%;
        max-width: none;
    }
    
    .nox-theme-options {
        grid-template-columns: 1fr;
    }
    
    .nox-btn-test {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
}
