/* Виджет консультанта */
.consultant-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 280px;
    max-width: calc(100vw - 40px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    overflow: hidden;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.consultant-widget.show {
    transform: translateY(0);
    opacity: 1;
}

.consultant-widget.collapsed .free-consultation {
    display: none !important;
}

.consultant-widget.collapsed {
    width: auto;
    min-width: 180px;
}

.consultant-widget.collapsed .consultant-title {
    display: block;
}

.consultant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #31353d;
    color: #fff;
    cursor: pointer;
    gap: 10px;
}

.consultant-header__info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.consultant-header__photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.consultant-header__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.consultant-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}

.consultant-name {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.consultant-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.consultant-toggle:hover {
    opacity: 0.8;
}

.consultant-toggle .toggle-icon-collapse,
.consultant-toggle .toggle-icon-expand {
    position: absolute;
    transition: opacity 0.3s ease;
}

.consultant-widget.collapsed .toggle-icon-collapse {
    display: none;
}

.consultant-widget.collapsed .toggle-icon-expand {
    display: block !important;
    transform: rotate(180deg);
}

.consultant-widget:not(.collapsed) .toggle-icon-expand {
    display: none;
}

.free-consultation {
    padding: 12px !important;
}

.manager-wrapper {
    margin-bottom: 12px;
}

.manager {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.manager picture {
    flex-shrink: 0;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
}

.manager__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.manager-info {
    flex: 1;
}

.manager__name {
    font-size: 13px !important;
    font-weight: 600;
    color: #333;
    margin: 0 0 2px 0 !important;
    line-height: 1.3 !important;
}

.manager__post {
    font-size: 11px !important;
    color: #666;
    margin: 0 !important;
    line-height: 1.3 !important;
}

.manager-wrapper hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 8px 0;
}

.manager__contacts {
    margin-top: 8px;
}

.manager__contacts-descr {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.manager__contacts-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #333;
    font-size: 12px;
    transition: color 0.3s ease;
    line-height: 1.3;
}

.contact-link-icon-only {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.contact-link-icon-only:hover {
    background: #e8e8e8;
    transform: scale(1.1);
}

.contact-link-icon-only .contact-icon {
    margin: 0;
    font-size: 16px;
}

/* Иконки мессенджеров в ряд */
.manager__contacts-messengers {
    display: flex;
    gap: 8px;
    align-items: center;
}

.manager__contacts-content .contact-link:not(.contact-link-icon-only) {
    margin-bottom: 0;
}

.contact-link:hover {
    color: #f0cf4c;
}

.contact-label {
    font-weight: 500;
    min-width: 60px;
    font-size: 11px;
}

.contact-value {
    color: #666;
    font-size: 11px;
}

.contact-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #25D366;
    font-size: 14px;
    flex-shrink: 0;
}

.contact-link[href*="t.me"] .contact-icon,
.contact-link[href*="telegram"] .contact-icon {
    color: #0088cc;
}

.contact-link[href*="wa.me"] .contact-icon,
.contact-link[href*="whatsapp"] .contact-icon {
    color: #25D366;
}

.contact-link-icon-only {
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.contact-link-icon-only:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

.contact-link-icon-only .contact-icon {
    margin: 0;
}

.consultant-widget .order-btn,
.free-consultation .order-btn {
    width: 100% !important;
    padding: 8px 16px !important;
    background: #f0cf4c !important;
    color: #000 !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px !important;
    line-height: 1.4 !important;
}

.consultant-widget .order-btn:hover,
.free-consultation .order-btn:hover {
    background: #e0bf3c !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(240, 207, 76, 0.3) !important;
}

.consultant-change-manager-link {
    display: block;
    text-align: center;
    margin-top: 8px;
    font-size: 11px;
    color: #666;
    text-decoration: underline;
    transition: color 0.2s ease;
    line-height: 1.3;
}

.consultant-change-manager-link:hover {
    color: #333;
    text-decoration: none;
}

/* Адаптивность */
@media (max-width: 768px) {
    .consultant-widget {
        width: calc(100vw - 20px);
        right: 10px;
        bottom: 10px;
        max-width: 280px;
    }
}

