/* ========================================== */
/* ФАЙЛ: add-qr-modal.css
 * НАЗНАЧЕНИЕ: Модальное окно создания QR-кода (стиль как add-link-modal)
 * ========================================== */

.add-qr-modal {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffdd76;
    border-radius: 12px;
    z-index: 1000;
    padding: 24px 30px;
    overflow-y: auto;
}

.add-qr-modal.active {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.add-qr-modal__content {
    position: relative;
    margin: 0 auto;
    max-width: 520px;
    width: calc(100% - 20px);
}

.add-qr-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    font-size: 32px;
    color: var(--text-dark, #222);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.add-qr-modal__close:hover {
    transform: scale(1.2);
}

.add-qr-modal__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark, #222);
    margin: 0 0 18px 0;
    text-align: center;
}

.add-qr-modal__url {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background-color: #f0f0f0;
    color: var(--text-dark, #222);
    margin-bottom: 16px;
}

.add-qr-modal__url::placeholder {
    color: #999;
}

.add-qr-modal__preview-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.add-qr-modal__preview {
    width: min(280px, 100%);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    padding: 16px;
    box-sizing: border-box;
}

.add-qr-modal__preview canvas,
.add-qr-modal__preview img {
    max-width: 100%;
    height: auto;
    display: block;
}

.add-qr-modal__settings {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.add-qr-modal__field {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.add-qr-modal__field label,
.add-qr-modal__field-label {
    font-size: 13px;
    font-weight: 600;
    color: #2a3a3b;
    min-width: 64px;
}

.add-qr-modal__field input[type="color"] {
    width: 44px;
    height: 36px;
    border: none;
    border-radius: 8px;
    padding: 0;
    cursor: pointer;
    background: transparent;
}

.add-qr-modal__field select {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #f0f0f0;
    color: var(--text-dark, #222);
    cursor: pointer;
}

.add-qr-modal__size-hint {
    font-size: 13px;
    font-weight: 600;
    color: #5a6b6c;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.add-qr-modal__field--design {
    align-items: flex-start;
}

.add-qr-modal__designs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.add-qr-modal__design {
    padding: 8px 10px;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    color: #2a3a3b;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.add-qr-modal__design:hover {
    border-color: #1a6b6d;
}

.add-qr-modal__design.is-active {
    border-color: #1a6b6d;
    background: rgba(26, 107, 109, 0.1);
    color: #1a6b6d;
}

.add-qr-modal__actions {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.add-qr-modal__save {
    padding: 12px 28px;
    background-color: #4caf50;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-qr-modal__save:hover:not(:disabled) {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.add-qr-modal__save:disabled {
    opacity: 0.65;
    cursor: wait;
}

.add-qr-modal__hint {
    margin: 0;
    text-align: center;
    font-size: 12px;
    color: #555;
    min-height: 1.2em;
}

@media (max-width: 880px) {
    .add-qr-modal {
        padding: 18px 16px;
    }

    .add-qr-modal__title {
        font-size: 18px;
        margin-bottom: 14px;
    }

    .add-qr-modal__preview {
        min-height: 180px;
        padding: 12px;
    }
}
