/* ===================================== */
/*         PLAYLIST MODAL STYLES         */
/* ===================================== */

/* Форма создания/редактирования */
.create-playlist-form,
.edit-playlist-form {
    padding: 10px 0;
}

/* Загрузка обложки */
.cover-upload {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 25px;
    cursor: pointer;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.cover-preview {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #333, #111);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: var(--accent);
    background-size: cover;
    background-position: center;
    transition: all 0.3s ease;
}

.cover-upload:hover .cover-preview {
    filter: brightness(0.8);
}

.cover-upload-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #000;
    border: 2px solid var(--bg-card);
    opacity: 0.9;
    transition: all 0.2s ease;
    pointer-events: none;
}

.cover-upload:hover .cover-upload-icon {
    transform: scale(1.1);
    opacity: 1;
}

/* Поля формы */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: white;
    font-size: 15px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.form-input:focus {
    border-color: var(--accent);
    background: rgba(255,255,255,0.1);
    outline: none;
    box-shadow: 0 0 15px rgba(255,215,0,0.2);
}

.form-input::placeholder {
    color: rgba(255,255,255,0.3);
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* Чекбокс */
.form-checkbox {
    margin: 20px 0;
}

.form-checkbox label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 14px;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}

/* Кнопки в модальном окне */
.modal-footer {
    display: flex;
    gap: 10px;
    padding: 20px 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
}

.modal-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
}

.modal-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.modal-btn.primary {
    background: linear-gradient(135deg, var(--accent), #ffaa00);
    color: #000;
    box-shadow: 0 5px 15px rgba(255,215,0,0.3);
}

.modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,215,0,0.5);
}

.modal-btn.delete {
    background: rgba(255,75,75,0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255,75,75,0.3);
}

.modal-btn.delete:hover {
    background: rgba(255,75,75,0.3);
}

/* Модальное окно подтверждения */
.confirm-modal .modal-content {
    width: 400px;
}

.confirm-modal .modal-body {
    padding: 20px 24px;
    text-align: center;
}

.confirm-modal p {
    margin: 0 0 15px 0;
    font-size: 16px;
    line-height: 1.5;
}

.confirm-modal .warning-text {
    color: #ff6b6b;
    font-size: 14px;
    margin-top: 10px;
}

/* Селектор плейлистов */
.playlist-selector {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

.playlist-selector-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 2px 0;
}

.playlist-selector-item:hover {
    background: rgba(255,215,0,0.1);
}

.playlist-selector-item.disabled {
    opacity: 0.5;
    cursor: default;
}

.playlist-selector-cover {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent);
}

.playlist-selector-info {
    flex: 1;
    min-width: 0;
}

.playlist-selector-name {
    font-size: 15px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-selector-meta {
    font-size: 12px;
    color: var(--text-dim);
}

.playlist-selector-check {
    color: var(--accent);
    font-weight: bold;
    font-size: 18px;
    margin-left: 10px;
}

/* Скролл в селекторе */
.playlist-selector::-webkit-scrollbar {
    width: 4px;
}

.playlist-selector::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
}

.playlist-selector::-webkit-scrollbar-thumb {
    background: rgba(255,215,0,0.3);
    border-radius: 2px;
}

/* Адаптив */
@media (max-width: 768px) {
    .cover-upload {
        width: 120px;
        height: 120px;
    }

    .cover-preview {
        font-size: 48px;
    }

    .cover-upload-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .modal-footer {
        flex-direction: column;
        padding: 16px 20px;
    }

    .modal-btn {
        width: 100%;
    }

    .confirm-modal .modal-content {
        width: 90%;
    }

    .playlist-selector-item {
        padding: 10px 12px;
    }

    .playlist-selector-cover {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .playlist-selector-name {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .cover-upload {
        width: 100px;
        height: 100px;
    }

    .cover-preview {
        font-size: 40px;
    }

    .form-input {
        padding: 10px 12px;
        font-size: 14px;
    }

    .form-checkbox label {
        font-size: 13px;
    }
}