.form-group {
    margin-bottom: 1rem;
}
.form-bg-left h2.header-right {
    font-size: 18px !important;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}
.form-group .dropzone {
    position: relative;
    text-align: left;
}

.form-group .dropzone .dropzone_textarea:focus,
.form-group .dropzone .dropzone_textarea:active {
    outline-offset: -1px;
    outline-color: #02b1d0;
}

.form-group .dropzone .dropzone_textarea:hover {
    outline-offset: -1px;
    outline-color: #02b1d0 !important;
}

.form-group .dropzone .dropzone_textarea {
    border: 1px dashed #CCC;
    width: 100%;
    position: relative;
    z-index: 0;
    background: none;
    resize: none;
    padding: 10px;
    box-sizing: inherit;
    border-radius: 12px;
}

.form-group .dropzone .dropzone_background {
    padding: 1em;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    text-align: center;
    transition: opacity 0.25s;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.form-group .dropzone .dropzone_title {
    color: #5E6278;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-align: left;
}

.form-group .dropzone .dropzone_title .dropzone_upload {
    color: #05C3C0;
    pointer-events: all;
    cursor: pointer;
}

.form-group .dropzone .dropzone_title .dropzone_upload:hover {
    text-decoration: underline;
}

.form-bg-right .box-img-render-main .box-img-bg {
    width: 100%;
}

.form-bg-right .box-img-render-main .box-img-bg {
    height: 100%;
}

/* CSS cho TextDisplay component */
.text-display-container {
    background: #f8f9fa;
    border-radius: 30px;
    margin: 20px 0;
    width: 80%;
    margin-bottom: -20px;
    margin-top: 60px;
    height: 100%;
    max-width: 800px;
    max-height: 750px;
}

.text-content-box {
    background: white;
    border: 2px solid #07A7CC;
    border-radius: 30px 30px 0 0;
    padding: 50px 0 50px 50px;
    position: relative;
    box-shadow: 0 4px 12px rgba(32, 189, 196, 0.1);
    width: 100%;
    height: 100%;
}



.sparkle-icon {
    position: absolute;
    top: 0px;
    right: 10px;
    background: transparent;
    padding: 8px;
    border-radius: 50%;
    /* border: 2px solid #20BDC4; */
}

.sparkle-icon img {
    width: 40px !important;
    height: 40px !important;
    max-width: unset !important;
}

.text-content {
    line-height: 1.5;
    overflow-y: auto;
    padding-right: 50px;
    width: 100%;
    height: calc(100% - 100px);
}

.text-content p {
    color: #555;
    font-size: 16px;
    margin-bottom: 12px;
    text-align: justify;
}

.action-button-container {
    text-align: center;
    margin-top: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.add-to-design-btn {
    background: linear-gradient(90deg, #01C4D5 0%, #05C4C1 39.06%, #07A7CC 70.5%, #058CD4 100%) !important;
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.add-to-design-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 189, 196, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .text-content {
        padding-right: 0px;
    }

    .text-display-container {
        width: calc(100% - 20px);
        margin: 15px 0;
        margin-bottom: -15px;
    }
    .formatted-text-simple{
        padding-right: 20px;
    }

    .text-content-box {
        padding: 40px 10px 10px 30px;
    }

    .text-content p {
        font-size: 14px;
    }

    .add-to-design-btn {
        padding: 10px 25px;
        font-size: 13px;
    }
}

/* Thêm CSS cho hiệu ứng typing */
.typing-cursor {
    animation: blink 1s infinite;
    color: #20BDC4;
    font-weight: bold;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.action-button-container {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.action-button-container.show {
    opacity: 1;
    transform: translateY(0);
}

.add-to-design-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}



/* Skeleton CSS */
.skeleton-text-container {
    padding: 10px 0;
}

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 12px;
}

.skeleton-line-1 {
    width: 100%;
}

.skeleton-line-2 {
    width: 95%;
}

.skeleton-line-3 {
    width: 88%;
}

.skeleton-line-4 {
    width: 92%;
}

.skeleton-line-5 {
    width: 85%;
}

.skeleton-line-6 {
    width: 90%;
}

.skeleton-line-short {
    width: 60%;
    margin-bottom: 0;
}

@keyframes skeleton-loading {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Existing CSS */
.typing-cursor {
    animation: blink 1s infinite;
    color: #20BDC4;
    font-weight: bold;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.action-button-container {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.action-button-container.show {
    opacity: 1;
    transform: translateY(0);
}

.add-to-design-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* CSS cho button sao chép */
.group-button-action {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    background-color: #f7f7f7;
    padding: 10px;
    border-radius: 12px;
}

.copy-button {
    background: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    color: #6c757d;
    font-weight: 500;
    font-size: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    height: 45px;
    width: 45px;
}

.copy-button:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #495057;
    transform: translateY(-1px);
}

.copy-button.copied {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.copy-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.copy-button i {
    font-size: 16px;
}


/* Animation cho icon check */
.copy-button.copied i {
    animation: checkmark 0.3s ease-in-out;
}

@keyframes checkmark {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.gradient_after {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
    width: 120%;
    height: 120%;
}

.gradient_after img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    max-width: unset !important;
    max-height: unset !important;
    /* animation: rotate360 10s linear infinite; */
    backdrop-filter: blur(20px);
}

/* Animation xoay tròn */
@keyframes rotate360 {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Container chính cần có position relative */
.group-box-img-btn {
    position: relative;
    overflow: hidden;
}

.box-img-bg {
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    border-radius: 20px;
}

/* Responsive cho mobile */
@media (max-width: 768px) {
    .gradient_after img {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 480px) {
    .gradient_after img {
        width: 250px;
        height: 250px;
    }
}

/* Custom Select CSS */
.custom-select-wrapper {
    position: relative;
}

.custom-select-label {
    display: block;
    color: #5E6278;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.custom-select-container {
    position: relative;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    color: #5E6278;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
}

.custom-select-trigger:hover,
.custom-select-trigger:focus {
    border-color: #02B1D0 !important;
    background-color: #E5F9FF;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.dropdown-arrow.open {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 160px;
    overflow-y: auto;
    margin-top: 4px;
    padding: 10px;
}

.custom-select-option {
    padding: 12px 16px;
    color: #495057;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    border-radius: 8px;
}

.custom-select-option:hover {
    background: #f8f9fa;
}

.custom-select-option.selected {
    background: #f1f1f1;
    color: #252525;
    font-weight: 500;
}



/* Scrollbar cho dropdown */
.custom-select-dropdown::-webkit-scrollbar {
    width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .custom-select-trigger {
        padding: 14px 16px;
        font-size: 16px;
        min-height: 52px;
    }

    .custom-select-option {
        padding: 14px 16px;
        font-size: 16px;
    }

    .custom-select-label {
        font-size: 15px;
    }
}

.form-bg-left .button-check-upload .form-check {
    margin: 20px 0 !important;
}

/* Alert Error Component CSS */
.alert-error-absolute {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    animation: slideInFromRight 0.4s ease-out;
}

.alert-error-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff6f6;
    border: none;
    border-left: 4px solid #dc3545;
    padding: 16px 20px;
    backdrop-filter: blur(10px);
    max-width: 400px;
    min-width: 300px;
}

.alert-error-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-error-text {
    flex: 1;
    color: #c53030;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

.alert-error-text strong {
    font-weight: 700;
    margin-right: 4px;
}

.alert-error-close {
    background: none;
    border: none;
    color: #c53030;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.alert-error-close:hover {
    color: #a02622;
}

/* Animations */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Auto hide animation */
.alert-error-absolute.auto-hide {
    animation: slideInFromRight 0.4s ease-out, fadeOut 0.4s ease-out 4.6s forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .alert-error-absolute {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .alert-error-content {
        min-width: auto;
        max-width: none;
        padding: 14px 16px;
    }

    .alert-error-text {
        font-size: 13px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .alert-error-content {
        color: #ff6b6b;
    }

    .alert-error-text {
        color: #ff6b6b;
    }
}

/* CSS cho formatted text */
.formatted-text {
    line-height: 1.5;
    white-space: pre-line;
    /* Giữ nguyên line breaks */
}

.text-paragraph {
    margin-bottom: 12px;
    text-align: justify;
}

.text-list-item {
    margin-bottom: 8px;
    padding-left: 16px;
    position: relative;
    font-weight: 500;
    color: #333;
}

.text-list-item::before {
    content: '•';
    color: #20BDC4;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

.typing-text {
    white-space: pre-wrap;
    line-height: 1.5;
}

.typing-cursor {
    animation: blink 1s infinite;
    color: #20BDC4;
    font-weight: bold;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* CSS để handle line breaks */
.formatted-text-simple {
    white-space: pre-line;
    line-height: 1.5;
    font-size: 16px;
    font-weight: 400;
}

.typing-text {
    white-space: pre-wrap;
    line-height: 1.5;
    font-size: 16px;
    font-weight: 400;
}

.typing-cursor {
    animation: blink 1s infinite;
    color: #20BDC4;
    font-weight: bold;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

#page-render-imageToText .button-drag-modal span.text-highlight {
    font-size: 16px;
}

#page-render-imageToText .form-bg-left .box-button-drag-modal {
    font-size: 16px;
}

.form-create-text-render .group-form-data {
    position: relative;
    max-height: calc(100% - 70px);
    height: 100%;
    overflow-y: auto;
    padding-right: 10px;
}

.form-create-text-render {
    height: 100%;
}

#page-render-imageToText .form-bg-left .button-absolute {
    position: absolute;
    left: 0;
    width: 100%;
    padding: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

@media (max-width: 1000px) {
    #page-render-imageToText .row-box .flex-box-left {
        /* min-height: unset !important; */
        /* max-height: unset !important; */
        height: 100% !important;
    }

    #page-render-imageToText .row-box .flex-box-left .form-bg-left {
        min-height: 100% !important;
        display: flex;
        flex-direction: column;
    }

    #page-render-imageToText .form-bg-left .button-absolute {
        position: relative;
        height: 70px !important;
        width: 100% !important;
        padding: 0;
    }


    .form-create-text-render {
        display: flex;
        flex-direction: column;
        justify-content: start;
        flex: 1 1;
        width: 100%;
    }

    #page-render-imageToText .group-form-data {
        max-height: calc(100% - 70px) !important;
        display: flex;
        flex-direction: column;
        justify-content: start;
        flex: 1 1;
        overflow: auto;
    }
}

.modal-country-select {
  max-width: 90vw !important;
  width: 100%;
  margin: 0 auto;
}
.modal-country-select .modal-body.model-body-custom {
    max-height: 100% !important;
    overflow-y: auto !important;
}

.modal-country-select .modal-content {
    height: 100% !important;
}