/* ============================================
   IMPORT MUSIC
   ============================================ */

.import-overlay {
    position: fixed;
    inset: 0;
    z-index: 30000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
}

.import-overlay.active {
    display: flex;
    animation: importFadeIn 0.2s ease;
}

@keyframes importFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.import-card {
    width: min(560px, 100%);
    max-height: 92vh;
    overflow-y: auto;
    padding: 24px;
    border-radius: 22px;
    background: #141416;
    border: 1px solid rgba(255, 215, 0, 0.16);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
    color: #f2f2f2;
}

.import-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.import-header h2 {
    margin: 0;
    font-size: 22px;
    color: #ffd700;
}

.import-header p {
    margin: 6px 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

.import-close {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.import-close:hover {
    background: rgba(255, 75, 75, 0.85);
}

.import-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 5px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.import-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 8px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.import-tab.active {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #111;
    box-shadow: 0 4px 14px rgba(255, 215, 0, 0.2);
}

.import-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 34px 18px;
    border: 2px dashed rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    background: rgba(255, 215, 0, 0.03);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.import-drop:hover,
.import-drop.dragover {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.08);
}

.import-drop-icon {
    font-size: 34px;
}

.import-drop-title {
    font-size: 15px;
    font-weight: 600;
}

.import-drop-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

.import-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 215, 0, 0.18);
}

.import-file-icon {
    font-size: 26px;
}

.import-file-info {
    flex: 1;
    min-width: 0;
}

.import-file-name {
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-file-size {
    margin-top: 3px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

.import-file-remove {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.import-fields {
    margin-top: 14px;
}

.import-field {
    display: block;
    margin-bottom: 12px;
}

.import-field span {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.import-field select,
.import-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #1c1c20;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.import-field select:focus,
.import-field input:focus {
    border-color: #ffd700;
}

.import-hint {
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.42);
}

.import-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.import-progress-track {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.import-progress-fill {
    width: 0;
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #ffd700, #ffaa00);
    transition: width 0.2s;
}

.import-progress-text {
    min-width: 38px;
    text-align: right;
    font-size: 12px;
    color: #ffd700;
    font-family: monospace;
}

.import-status {
    min-height: 18px;
    margin-top: 10px;
    font-size: 13px;
    text-align: center;
}

.import-status.success { color: #6ee7a8; }
.import-status.error { color: #ff6b6b; }

.import-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.import-actions button {
    flex: 1;
    height: 46px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.import-cancel {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.import-submit {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #111;
}

.import-submit:disabled {
    opacity: 0.45;
    cursor: default;
}

@media (max-width: 600px) {
    .import-overlay {
        padding: 10px;
        align-items: flex-end;
    }

    .import-card {
        padding: 18px;
        border-radius: 20px 20px 0 0;
        max-height: 88vh;
    }

    .import-header h2 {
        font-size: 19px;
    }
}

/* Атрибут hidden не работает, если у класса задан display */
.import-overlay [hidden] {
    display: none !important;
}
