/* Виджет «Связь с разработчиком» — в стиле мастера подбора */
.devfb-widget {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 10100;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    pointer-events: none;
}

.devfb-widget * {
    box-sizing: border-box;
}

.devfb-widget__panel,
.devfb-widget__trigger-wrap {
    pointer-events: auto;
}

/* Кнопка-триггер */
.devfb-widget__trigger-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.devfb-widget__trigger {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: #0A2F52;
    color: #fff;
    box-shadow: 0 6px 24px rgba(10, 47, 82, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s;
    padding: 0;
    position: relative;
    overflow: visible;
}

.devfb-widget__trigger::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 4px;
    border-radius: 2px;
    background: #FF6B35;
}

.devfb-widget__trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(10, 47, 82, 0.48);
    background: #0D3B66;
}

.devfb-widget__trigger-icon {
    width: 26px;
    height: 26px;
    display: block;
}

.devfb-widget__trigger-label {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: #0A2F52;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s, visibility 0.18s;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(10, 47, 82, 0.25);
}

.devfb-widget__trigger-label::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: #0A2F52;
}

.devfb-widget__trigger-wrap:hover .devfb-widget__trigger-label {
    opacity: 1;
    visibility: visible;
}

.devfb-widget--open .devfb-widget__trigger {
    background: linear-gradient(135deg, #0D3B66, #FF6B35);
}

/* Панель */
.devfb-widget__panel {
    position: absolute;
    right: 0;
    bottom: 68px;
    width: 340px;
    max-width: calc(100vw - 32px);
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(10, 47, 82, 0.22);
    border: 1px solid rgba(226, 232, 240, 0.9);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.devfb-widget__panel::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, #0D3B66 0%, #FF6B35 100%);
}

.devfb-widget--open .devfb-widget__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.devfb-widget__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #0A2F52 0%, #0D3B66 100%);
    color: #fff;
}

.devfb-widget__header-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.devfb-widget__header-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.devfb-widget__header-text {
    flex: 1;
    min-width: 0;
}

.devfb-widget__title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}

.devfb-widget__status {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 2px;
}

.devfb-widget__close {
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.devfb-widget__close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.devfb-widget__body {
    padding: 14px 16px 8px;
    max-height: 420px;
    overflow-y: auto;
}

.devfb-widget__field {
    margin-bottom: 11px;
}

.devfb-widget__label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #0A2F52;
    margin-bottom: 5px;
}

.devfb-widget__input,
.devfb-widget__textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    color: #2d3748;
    background: #fafbfc;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.devfb-widget__input:focus,
.devfb-widget__textarea:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
    background: #fff;
}

.devfb-widget__textarea {
    min-height: 88px;
    resize: vertical;
}

.devfb-widget__textarea {
    min-height: 88px;
    resize: vertical;
}

.devfb-widget__field--comment {
    margin-bottom: 8px;
}

.devfb-widget__dropzone {
    position: relative;
    border-radius: 10px;
}

.devfb-widget__dropzone--active .devfb-widget__textarea {
    border-color: #FF6B35;
    background: #fff8f5;
}

.devfb-widget__dropzone--active .devfb-widget__drop-hint {
    opacity: 1;
    visibility: visible;
}

.devfb-widget__drop-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(10, 47, 82, 0.06);
    border: 2px dashed #FF6B35;
    color: #0A2F52;
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
}

.devfb-widget__attach-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.devfb-widget__attach-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fafbfc;
    color: #0A2F52;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.devfb-widget__attach-btn:hover {
    border-color: #FF6B35;
    color: #FF6B35;
    background: #fff;
}

.devfb-widget__attach-btn svg {
    width: 18px;
    height: 18px;
}

.devfb-widget__attach-hint {
    font-size: 11px;
    color: #718096;
    line-height: 1.35;
}

.devfb-widget__file-input {
    display: none;
}

.devfb-widget__files {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
}

.devfb-widget__files--visible {
    display: block;
}

.devfb-widget__file-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    margin-bottom: 4px;
    background: #f6f8fb;
    border: 1px solid #e8edf3;
    border-radius: 8px;
    font-size: 12px;
}

.devfb-widget__file-icon {
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1;
}

.devfb-widget__file-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #2d3748;
}

.devfb-widget__file-size {
    flex-shrink: 0;
    color: #718096;
    font-size: 11px;
}

.devfb-widget__file-remove {
    border: none;
    background: transparent;
    color: #718096;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    flex-shrink: 0;
}

.devfb-widget__file-remove:hover {
    color: #c62828;
}

.devfb-widget__footer {
    padding: 8px 16px 16px;
}

.devfb-widget__send-btn {
    width: 100%;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: linear-gradient(135deg, #0D3B66, #FF6B35);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    padding: 11px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.devfb-widget__send-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(13, 59, 102, 0.35);
}

.devfb-widget__send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.devfb-widget__send-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

.devfb-widget__hint {
    font-size: 11px;
    color: #718096;
    line-height: 1.4;
    text-align: center;
    margin-top: 8px;
}

.devfb-widget__message {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: 8px;
    display: none;
}

.devfb-widget__message--visible {
    display: block;
}

.devfb-widget__message--success {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #c8e6c9;
}

.devfb-widget__message--error {
    background: #ffebee;
    color: #b71c1c;
    border: 1px solid #ffcdd2;
}

@media (max-width: 480px) {
    .devfb-widget {
        right: 14px;
        bottom: 14px;
    }

    .devfb-widget__panel {
        bottom: 64px;
        width: calc(100vw - 28px);
    }

    .devfb-widget__trigger-label {
        display: none;
    }
}
