.calculator_form.open {
    display: block;
    font-family: 'Open Sans';
    align-content: center;
}

.calculator_form.modal:before {
    display: unset;
}

.modal-calc {
    display: inline-block;
    text-align: left;
    vertical-align: middle;
    background: white;
    border-radius: 15px 15px 10px 10px;
}

.calc-close {
    display: contents;
    cursor: pointer;
}

.calc-header {
    background-image: url("images/calc-backgroung.png");
    background-position: center;
    background-size: cover;
    border-radius: 10px 10px 0 0;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.calc-header-title {
    margin: 0;
    font-style: normal;
    font-weight: 600;
    font-size: 24px;
    line-height: 32px;
    text-transform: uppercase;
    color: #FFFFFF;
}

.type {
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    line-height: 22px;
    color: #000000;
    margin-bottom: 8px;
}

.block_value-type {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.value-type {
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    color: #000000;
    opacity: 0.6;
    border: 0.5px solid rgba(0, 0, 0, 0.2);
    width: calc(50% - 5px);
    padding: 4px;
    cursor: pointer;
    max-width: 160px;
    align-content: center;
    word-wrap: break-word;
}

.value-type.full-value-type {
    width: 100%;
    max-width: 330px;
}

.value-type.active {
    border: 0.5px solid rgba(252, 103, 33, 0.2);
    box-shadow: 0px 4px 5px rgba(201, 201, 201, 0.5);
    color: #FC6721;
}

.calc-footer {
    display: flex;
    padding: 24px;
    gap: 24px;
    align-items: stretch;
    overflow-y: hidden;
    max-height: calc(100vh - 65px);
}

.info-block {
    display: flex;
    flex-direction: column;
    flex: 1;
    background-color: #F5F5F5;
    width: 33.33%;
    max-width: 380px;
    border-radius: 5px;
    overflow: auto;
    max-height: calc(100vh - 65px);
}

.calc-footer-title {
    background-image: url("images/calc-backgroung-block.png");
    background-size: cover;
    background-position: center;
    padding: 17px;
    margin: 0;
    border-radius: 5px 5px 0 0;
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    color: #FFFFFF;
}

.calc-inside-block {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    gap: 15px;
    color: black;
    padding: 17px;
}

.calc-footer input {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 6px 0px 8px 8px;
    background: #FFFFFF;
    border: 1px solid #00000050;
}

.form-control:valid:not(:placeholder-shown) {
    border: 0.5px solid #FC6721;
}

.slider-value {
    position: absolute;
    top: 0;
    font-size: 12px;
    line-height: 20px;
    color: #000;
    opacity: 0.6;
    pointer-events: none;
}

#input_length {
    width: 100%;
    height: 6px;
    appearance: none;
    border-radius: 10px;
    outline: none;
    padding: 0;
}

#input_length::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FC6721;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#input_length::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FC6721;
    cursor: pointer;
}

#input_length::-ms-track {
    background: transparent;
    border-color: transparent;
    color: transparent;
}

.range__block {
    position: relative;
    padding: 24px 0 12px;
}

.length__block {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.items-info {
    display: flex;
    flex-direction: column;
    padding: 11px 10px;
    gap: 18px;
    background: #FED9C7;
}

.item-info {
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #FC6721;
    padding-left: 26px;
    position: relative;
}

.item-info:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 16px;
    height: 18px;
    background-image: url("images/info-icon.svg");
}

.item-info a {
    font-weight: 700;
    text-decoration: underline;
}

.calc-items {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 16px;
}

.calc-item {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.calc-item.calc-item-more {
    flex-direction: column;
}

.calc-info,
.calc-value {
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    line-height: 22px;
    color: #000000;
}

.more-info.calc-info {
    font-weight: 400;
}

.sum-info {
    font-style: normal;
    font-weight: 700;
    font-size: 20px;
    line-height: 25px;
    color: #000000;
}

.sum-value {
    font-style: normal;
    font-weight: 700;
    font-size: 24px;
    line-height: 24px;
    color: #FC6721;
}

.sum-block {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
}

.calc-value {
    max-width: 60%;
    text-align: right;
    FONT-WEIGHT: 700;
}

.input-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calc-btn,
.calc-btn-close {
    width: 100%;
    padding: 8px 0px;
    background: #FC6721;
    border-radius: 5px;
    border: 0;
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    color: #FFFFFF;
}

textarea.form-control {
    resize: none;
    height: 100px;
}

.form-control:focus {
    border-color: #bbb;
    box-shadow: unset;
    border: 0.5px solid #FC6721;
}


.file-upload-info-hover {
    display: none;
    flex-direction: column;
    position: absolute;
    top: -60px;
    left: 0;
    width: 230px;
    padding: 10px;
    background: #FED9C7;
    font-weight: 400;
    font-size: 12px;
    line-height: 20px;
    color: #FC6721;
}

.file-upload-info:hover .file-upload-info-hover {
    display: flex;
}

.file-upload-info {
    z-index: 10;
    cursor: help;
    display: flex;
}

.selected-files-container {
    display: none;
}

.info-upload-file {
    position: relative;
    height: 6px;
    margin-top: 8px;
    border-radius: 10px;
}

.upload-progress-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: #CCCCCC;
    border-radius: 10px;
    overflow: hidden;
}

.upload-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 6px;
    background: #FC6721;
    border-radius: 10px;
    width: 0;
    transition: width 0.3s ease;
}

.file-upload-area {
    position: relative;
    margin-bottom: 8px;
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    top: 0;
    left: 0;
}

.file-upload-label {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.file-upload-area.drag-over .file-upload-label {
    background-color: #d1ecf1;
    border-color: #0dcaf0;
    border-style: solid;
}

.file-upload-icon {
    width: 16px;
    height: 16px;
}

.file-upload-text {
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    line-height: 22px;
    text-decoration-line: underline;
    color: #FC6721;
    flex-grow: 0;
}

.selected-files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
}

.selected-files-title {
    font-weight: 600;
    color: #495057;
    font-size: 15px;
}

.selected-files-count {
    font-size: 13px;
    color: #6c757d;
    background-color: #e9ecef;
    padding: 2px 8px;
    border-radius: 10px;
}

.selected-files-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

.file-item-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
    min-width: 0;
}

.file-item-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.file-item-icon.image {
    background-color: #0d6efd;
}

.file-item-icon.ai {
    background-color: #ff7f00;
}

.file-item-icon.tiff {
    background-color: #198754;
}

.file-item-icon.default {
    background-color: #6c757d;
}

.file-item-info {
    flex-grow: 1;
    min-width: 0;
}

.file-item-name {
    font-style: normal;
    font-weight: 600;
    font-size: 12px;
    line-height: 20px;
    color: #000000;
}

.file-item-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.file-item-size {
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 20px;
    color: #CCCCCC;
}

.file-item-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.file-item-status.success {
    color: #198754;
}

.file-item-status.error {
    color: #dc3545;
}

.file-item-status.warning {
    color: #ffc107;
}

.file-item {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.file-item-remove {
    border: none;
    cursor: pointer;
    width: 15px;
    height: 15px;
    background-image: url("images/delete-file.svg");
}

.file-error {
    margin-top: 8px;
    padding: 10px 12px;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 6px;
    color: #842029;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shake 0.5s ease;
}

.file-error-icon {
    font-size: 16px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.selected-files-list::-webkit-scrollbar,
.info-block::-webkit-scrollbar {
    width: 3px;
}

.selected-files-list::-webkit-scrollbar-track,
.info-block::-webkit-scrollbar-track {
    background: #FC6721;
    border-radius: 3px;
}

#calcSuccess {
    display: none;
    border-radius: 15px;
    background-image: url("images/calc-backgroung.png");
    background-position: center;
    background-size: cover;
    position: relative;
    padding: 30px;
}

#calcSuccess h4 {
    color: white;
    margin-bottom: 20px;
}

.open-form-calc {
    justify-self: center;
    padding: 15px 30px;
    background: linear-gradient(to right, #FC6721 0%, #FFC7AC 100%);
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    color: #FFFFFF;
    border: 0;
    border-radius: 5px;
}

.open-form-calc svg {
    margin-right: 10px;
}

@media screen and (max-width: 768px) {
    .modal-calc,
    .calc-header {
        width: 100%;
        border-radius: 0;
    }

    .calc-footer {
        height: calc(100vh - 56px);
        overflow: scroll;
        flex-direction: column;
        gap: 24px;
        padding: 24px;
    }

    .info-block {
        width: 100%;
        max-width: 100%;
        overflow: unset;
        max-height: unset;
    }

    .value-type,
    .value-type.full-value-type {
        width: 100%;
        max-width: 100%;
    }

    .calc-header-title {
        font-size: 16px;
        line-height: 24px;
    }

    .file-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .file-item-remove {
        align-self: flex-end;
    }
}