/**
 * QR generator: контролы 1:1 как body.invoice-page #invoiceForm в invoice.html.
 * Подключать после selects.css и invoice-controls-unified.css.
 */

body.qr-generator-page .qr-panel .qr-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: rgba(238, 238, 238, 0.6);
}

body.qr-generator-page .qr-panel .qr-input,
body.qr-generator-page .qr-panel textarea.qr-input,
body.qr-generator-page .qr-panel .qr-hex-input {
    width: 100%;
    height: 41px;
    min-height: 41px;
    border-radius: 12px;
    background-color: rgba(238, 238, 238, 0.08);
    background: rgba(238, 238, 238, 0.08);
    border: none;
    color: var(--color-input-text, #eeeeee);
    box-sizing: border-box;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    font-size: 14px;
    font-family: var(--font-primary, system-ui, sans-serif);
    line-height: 41px;
    padding: 0 14px;
    outline: none;
}

body.qr-generator-page .qr-panel textarea.qr-input {
    height: auto;
    min-height: 112px;
    line-height: 1.4;
    padding: 10px 14px;
    resize: vertical;
}

body.qr-generator-page .qr-panel input[type="color"].qr-input.qr-color-picker {
    width: 42px;
    min-width: 42px;
    padding: 3px;
    border-radius: 10px;
    border: none;
    background: rgba(238, 238, 238, 0.08);
}

body.qr-generator-page .qr-panel input[type="color"].qr-input.qr-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 8px;
}

body.qr-generator-page .qr-panel input[type="color"].qr-input.qr-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 8px;
}

body.qr-generator-page .qr-panel input[type="color"].qr-input.qr-color-picker::-moz-color-swatch {
    border: none;
    border-radius: 8px;
}

body.qr-generator-page .qr-panel .qr-input:hover,
body.qr-generator-page .qr-panel textarea.qr-input:hover,
body.qr-generator-page .qr-panel .qr-hex-input:hover {
    background-color: rgba(238, 238, 238, 0.1);
    background: rgba(238, 238, 238, 0.1);
    border: none;
}

body.qr-generator-page .qr-panel .qr-input:focus,
body.qr-generator-page .qr-panel textarea.qr-input:focus,
body.qr-generator-page .qr-panel .qr-hex-input:focus {
    background-color: rgba(238, 238, 238, 0.11);
    background: rgba(238, 238, 238, 0.11);
    border: none;
    outline: none;
}

/* Custom select trigger — как #currency-select-display на invoice */
body.qr-generator-page .qr-panel [data-enhanced-select="1"] select.qr-select {
    display: none !important;
}

body.qr-generator-page .qr-panel .invoice-currency-wrapper {
    position: relative;
    display: block;
    width: 100%;
    height: 41px;
    min-height: 41px;
    overflow: visible;
    z-index: 1;
}

body.qr-generator-page .qr-panel [data-enhanced-select="1"] .invoice-currency-select,
body.qr-generator-page .qr-panel .invoice-currency-select {
    width: 100% !important;
    height: 41px !important;
    min-height: 41px !important;
    border-radius: 12px !important;
    background-color: rgba(238, 238, 238, 0.08) !important;
    background: rgba(238, 238, 238, 0.08) !important;
    border: none !important;
    color: var(--color-input-text, #eeeeee) !important;
    box-sizing: border-box !important;
    -webkit-backdrop-filter: blur(6px) !important;
    backdrop-filter: blur(6px) !important;
    font-size: 14px !important;
    font-family: var(--font-primary, system-ui, sans-serif) !important;
    line-height: 41px !important;
    padding: 0 14px !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

body.qr-generator-page .qr-panel [data-enhanced-select="1"] .invoice-currency-select:hover,
body.qr-generator-page .qr-panel .invoice-currency-select:hover {
    background-color: rgba(238, 238, 238, 0.1) !important;
    background: rgba(238, 238, 238, 0.1) !important;
    border: none !important;
}

body.qr-generator-page .qr-panel [data-enhanced-select="1"].invoice-currency-wrapper.select-open .invoice-currency-select,
body.qr-generator-page .qr-panel .invoice-currency-wrapper.select-open .invoice-currency-select {
    background-color: rgba(238, 238, 238, 0.11) !important;
    background: rgba(238, 238, 238, 0.11) !important;
    border: none !important;
    outline: none !important;
    z-index: 1 !important;
}

body.qr-generator-page .qr-panel [data-enhanced-select="1"].invoice-currency-wrapper.select-open:not(.dropdown-open-up) .invoice-currency-select {
    border-radius: 12px 12px 0 0;
}

body.qr-generator-page .qr-panel [data-enhanced-select="1"].invoice-currency-wrapper.dropdown-open-up.select-open .invoice-currency-select {
    border-radius: 0 0 12px 12px;
}

body.qr-generator-page .qr-panel .invoice-currency-wrapper.select-open {
    z-index: 100001;
}

/* Выпадашка — как invoice.html */
body.qr-generator-page .qr-panel [data-enhanced-select="1"].invoice-currency-wrapper.select-open .invoice-currency-dropdown {
    z-index: 100005 !important;
    max-height: 240px !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    background-color: rgba(18, 18, 18, 0.98) !important;
    background: rgba(18, 18, 18, 0.98) !important;
    border: none !important;
    border-top: none !important;
    border-radius: 0 0 12px 12px !important;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.38) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    backdrop-filter: blur(10px) !important;
}

body.qr-generator-page .qr-panel [data-enhanced-select="1"].invoice-currency-wrapper.dropdown-open-up.select-open .invoice-currency-dropdown {
    border-radius: 12px 12px 0 0;
}

body.qr-generator-page .qr-panel [data-enhanced-select="1"] .invoice-currency-dropdown-inner {
    align-items: stretch;
    padding: 4px 2px;
    box-sizing: border-box;
}

body.qr-generator-page .qr-panel [data-enhanced-select="1"] .currency-option {
    color: var(--color-input-text, #eeeeee);
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 10px;
    padding: 10px 14px;
    direction: ltr;
    text-align: left;
    cursor: pointer;
}

body.qr-generator-page .qr-panel [data-enhanced-select="1"] .currency-option:hover,
body.qr-generator-page .qr-panel [data-enhanced-select="1"] .currency-option.selected {
    background-color: rgba(238, 238, 238, 0.1);
    background: rgba(238, 238, 238, 0.1);
}

body.qr-generator-page .qr-panel [data-enhanced-select="1"] .currency-option.selected {
    padding-right: 36px;
}

body.qr-generator-page .qr-panel [data-enhanced-select="1"] .currency-option.selected::after {
    right: 14px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
}

body.qr-generator-page .qr-panel [data-enhanced-select="1"].invoice-currency-wrapper.select-open .currency-option.selected {
    display: none;
}

body.qr-generator-page .qr-panel .qr-file-control {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

body.qr-generator-page .qr-panel .qr-file-button {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 41px;
    padding: 0 14px;
    border-radius: 12px;
    border: none;
    background: rgba(238, 238, 238, 0.08);
    color: var(--color-input-text, #eeeeee);
    font-size: 14px;
    font-family: var(--font-primary, system-ui, sans-serif);
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}

body.qr-generator-page .qr-panel .qr-file-button:hover {
    background: rgba(238, 238, 238, 0.1);
}

body.qr-generator-page .qr-panel .qr-file-name {
    flex: 1;
    min-width: 0;
    color: var(--color-text-disabled, rgba(238, 238, 238, 0.6));
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
