
.ptw-butWidget {
    position: fixed;
    top: auto;
    bottom: 30px;
    right: 30px;
    cursor: pointer;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}

.ptw-butWidget svg rect {
    transition: fill 0.3s ease;
}

.ptw-butWidget:hover svg rect {
    fill: #0086C9;
}

.ptw-butWidget.ptw--hidden {
    opacity: 0;
    transform: scale(0.7);
    pointer-events: none;
    visibility: hidden;
}

.fade-in {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.fade-in.show {
    opacity: 1;
}

#prog-time-widget {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: auto;
    right: 20px;
    top: auto;
    bottom: 20px;
    width: 360px;
    max-height: 600px;
    border-radius: 16px;
    box-shadow: 14px 13px 43px #181D2729;
    overflow: hidden;
    font-size: 15px;
    font-family: "Inter", sans-serif;
    z-index: 9999;
    background: #fff;
    opacity: 0;
    transform: translateY(20px) scale(0.97);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}

#prog-time-widget.ptw--open,
#prog-time-widget[style*="display: flex"],
#prog-time-widget[style*="display:flex"] {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#prog-time-widget header.ptw_header {
    display: flex;
    align-items: center;
    column-gap: 12px;
    background: #0BA5EC;
    padding: 20px 24px;
}

#prog-time-widget .ptw_block_logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

#prog-time-widget .ptw_text {
    color: #fff;
}

#prog-time-widget .ptw_dop_heading {
    font-size: 12px;
    font-weight: 300;
}

#prog-time-widget .ptw_name_manager {
    font-size: 24px;
    font-weight: 500;
    line-height: 31px;
}

#prog-time-widget button.ptw_close_but {
    display: flex;
    padding: 0;
    background: transparent;
    border: none;
    margin: 0 0 0 auto;
    cursor: pointer;
}

#prog-time-widget main.ptw_content_block {
    height: 586px;
    display: flex;
    flex-direction: column;
    row-gap: 24px;
    padding: 24px 10px 10px 24px;
    box-sizing: border-box;
    overflow-y: scroll;
}

#prog-time-widget .ptw_message_block {
    width: fit-content;
    max-width: 288px;
    margin: 0 auto 0 0;
    padding: 12px 16px;
    border-radius: 8px 8px 8px 0;
    color: #414651;
    background: #F5F5F5;
    box-sizing: border-box;
    font-weight: 400;
    white-space: pre-line;
}

#prog-time-widget .ptw_message_block.ptw_client_message_block {
    border-radius: 8px 8px 0 8px;
    color: #0086C9;
    background: #E0F2FE;
    margin: 0 0 0 auto;
}

#prog-time-widget .ptw_message_block .contentBlock {
    display: flex;
    flex-direction: column;
    row-gap: 10px;
}

#prog-time-widget .ptw_message_block .ptw_message_date {
    font-size: 12px;
    margin-top: 5px;
    color: #36BFFA;
    text-align: right;
}

#prog-time-widget .ptw_message_block.ptw_manager_message_block .ptw_message_date {
    float: left;
    color: #999EA1;
    text-align: left;
    font-weight: 100;
}

#prog-time-widget footer.ptw_footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid #D5D7DA;
    padding: 12px 16px;
}

#prog-time-widget .ptw_input_row {
    display: flex;
    align-items: center;
    gap: 8px;
}

#prog-time-widget label.ptw_attach_but {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s ease;
}

#prog-time-widget label.ptw_attach_but:hover {
    background: #F0F9FF;
}

#prog-time-widget .ptw_file_field {
    display: none;
}

#prog-time-widget textarea#ptw_text_field {
    flex: 1;
    min-width: 0;
    border: 1px solid #D5D7DA;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 15px;
    resize: none;
    font-family: "Inter", sans-serif;
    box-sizing: border-box;
}

#prog-time-widget textarea#ptw_text_field:focus {
    outline: none;
}

#prog-time-widget textarea#ptw_text_field::placeholder {
    color: #D5D7DA;
    font-weight: 400;
}

#prog-time-widget .ptw_attachments {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
}

#prog-time-widget .ptw_attachment_item {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #E0F2FE;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    color: #0086C9;
    max-width: 160px;
}

#prog-time-widget .ptw_attachment_name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    flex: 1;
}

#prog-time-widget .ptw_attachment_remove {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #0086C9;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

#prog-time-widget button.ptw_send_but {
    width: 44px;
    padding: 0;
    display: flex;
    background: transparent;
    border: none;
    cursor: pointer;
}

#prog-time-widget .ptw_send_but:disabled {
    cursor: default;
}

#prog-time-widget .ptw_send_but:disabled > svg rect {
    fill: #E0F2FE;
}

#prog-time-widget img.imageMessage {
    display: block;
    width: 100%;
    max-width: 256px;
    height: 192px;
    object-fit: cover;
    cursor: zoom-in;
    border-radius: 4px;
}

#prog-time-widget .ptw_file_card {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 230px;
    padding: 2px 0;
    cursor: pointer;
}

#prog-time-widget .ptw_file_icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

#prog-time-widget .ptw_file_info {
    display: flex;
    flex-direction: column;
    row-gap: 3px;
    min-width: 0;
    flex: 1;
}

#prog-time-widget .ptw_file_name {
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 165px;
    color: inherit;
}

#prog-time-widget .ptw_file_label {
    font-size: 11px;
    margin-top: 2px;
    opacity: 0.6;
    color: inherit;
}

.ptw_lightbox {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.ptw_lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    cursor: default;
    display: block;
}

.ptw_lightbox_close {
    position: fixed;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
    padding: 4px;
    z-index: 10001;
}

/* Стили для всей страницы */
#prog-time-widget ::-webkit-scrollbar {
    width: 12px; /* Ширина полосы прокрутки */
    height: 12px; /* Высота для горизонтальной прокрутки */
}

#prog-time-widget ::-webkit-scrollbar-track {
    background: #fff; /* Цвет фона трека */
    border-radius: 6px; /* Скругление углов */
}

#prog-time-widget ::-webkit-scrollbar-thumb {
    background: #D5D7DA; /* Цвет ползунка */
    border-radius: 6px; /* Скругление углов ползунка */
    border: 2px solid #fff; /* Обводка для отступа */
}

#prog-time-widget ::-webkit-scrollbar-thumb:hover {
    background: #f1f1f1; /* Цвет ползунка при наведении */
}

#prog-time-widget .date-line {
    position: relative;
    height: 15px;
}

#prog-time-widget .date-line hr.line {
    background: #D5D7DA;
    border: none;
    height: 1px;
}

#prog-time-widget .date-text {
    position: relative;
    top: -16px;
    line-height: 1;
    background: #fff;
    width: fit-content;
    margin: 0 auto;
    padding: 0 10px;
    color: #999EA1;
    font-size: 14px;
    font-weight: 100;
}

@media (max-width: 500px) {
    #prog-time-widget {
        top: 0;
        bottom: 0;
        right: 0;
        width: 100%;
        max-height: 100%;
        border-radius: 0;
        box-shadow: none;
    }
}

