.egs-pagination {
    text-align: center;
    margin-bottom: 20px;
}

.egs-dot {
    height: 5px;
    width: 25px;
    background-color: #bbb;
    display: inline-block;
    margin: 0 5px;
    transition: background-color 0.3s;
}

.egs-dot.active {
    background-color: #073B4C;
}

.egs-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.egs-col {
    flex: 1;
}

.egs-col.text-right {
    text-align: right;
}

.egs-step {
    width: 100%;
    display: block;
}

.egs-step-footer {
  margin-top: 20px;
}

.egs-button {
    font-size: 24px;
    font-weight: bold;
    background: #20C499;
    border: 0;
    color: #fff;
    border-radius: 20px;
    margin-right: 10px;
}

.egs-button:hover {
    background: #081E26;
}

textarea.large-text {
    width: 100%;
    height: 150px;
}

.egs-error {
    border: 2px solid red;
}

.egs-error-tooltip {
    position: relative;
    display: block;
    width: 100%;
}

.egs-error-tooltip::after {
    content: attr(data-error);
    position: absolute;
    background-color: #ff0000;
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 14px;
    bottom: 20px;
    right: 20px;
    white-space: nowrap;
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.egs-error-tooltip.egs-show-tooltip::after {
    display: block;
    opacity: 1;
}

.egs-multi-step-form textarea,
.egs-multi-step-form textarea.egs-error {
    width: 100% !important;
    border-radius: 10px;
}

.egs-multi-step-form textarea.egs-error {
    border: 2px solid #ff0000;
}

.egs-multi-step-form textarea:read-only {
    font-size: 14px;
    color: #777;
}

.egs-textarea-container {
    position: relative;
    margin-bottom: 20px;
}

.egs-textarea-container p {
    font-size: 14px;
}

.egs-textarea-container:last-child {
    margin-bottom: 0;
}

.egs-textarea-container h6,
.egs-form-column h6 {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: bold;
    color: #666;
}

.egs-textarea-container .egs-copy-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: #333;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
    border-radius: 3px;
    font-weight: bold;
    opacity: 0;
}

.egs-variation-container .egs-copy-btn {
    padding: 10px 20px;
    font-size: 20px;
}

.egs-textarea-container:hover .egs-copy-btn {
    opacity: 1;
}

.egs-copy-btn i {
    margin-right: 5px;
}

.egs-copy-btn:hover {
    background-color: #005880;
}

.egs-restart-btn {
    background: #FFD166;
}

.egs-detector-options {
    padding: 20px;
    text-align: center;
}

.egs-detector-options label {
    font-size: 20px;
    margin-right: 30px;
}

/* Loader */
.egs-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.egs-loading {
    position: relative;
}

.egs-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.egs-loader-text {
    margin-top: 10px;
    font-size: 16px;
    color: #333;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.egs-form-section {
    margin-bottom: 30px;
}

.egs-form-section label {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.egs-form-col-2 {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    align-items: stretch;
}

.egs-form-column {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.color-selector-controls {
    margin-top: 10px;
}

/* Ajuste para descrições */
#egs-replace-styles-step-2 .form-section-description {
    margin-top: 5px;
    margin-bottom: 15px;
    margin-left: 0;
}

#egs-replace-styles-step-2 .form-section-description p {
    font-size: 16px;
    font-style: italic;
}

.form-section-description p {
    font-size: 14px;
    font-style: italic;
    font-weight: normal;
}

/* Container dos seletores */
.egs-font-selector-wrapper,
.egs-color-selector-wrapper {
    margin-top: 15px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    flex: 1;
}

.egs-color-selector-wrapper {
    padding-top: 20px;
}

/* Ajustes para o container de seleção de fontes */
.egs-font-select-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    width: 100%;
}

/* FontPicker customization */

.fpicker__dropdown {
    z-index: 999999;
}

.fp-search-wrap {
    width: 100% !important;
}

.fp-lang {
    display: none;
}

/* Font Selector Styles */
.font-selectors {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.font-selector-item {
    flex: 0 0 calc(50% - 7.5px); /* 50% width minus half of the gap */
    display: flex;
    align-items: center;
    gap: 10px;
}

.font-selector-item .font-picker {
    flex: 1;
    margin-bottom: 0; /* Remove margin bottom since we're using gap */
}

.font-selector-item .remove-font {
    flex-shrink: 0;
    border-radius: 100%;
}

.remove-font {
    background: none;
    border: none;
    color: #dc3545;
    border: 0 !important;
    cursor: pointer;
    padding: 5px;
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.font-selector-controls {
    margin-top: 15px;
}

.add-font-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.add-font-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.fp-select {
    padding: 10px 26px 10px 8px !important;
}

/* Color Selector Styles */
.color-selectors {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.color-selector-item {
    flex: 0 0 80px; /* Largura fixa de 80px ao invés de porcentagem */
    height: 80px; /* Altura fixa para formar um quadrado */
    display: flex;
    flex-direction: column; /* Empilha os elementos verticalmente */
    align-items: center;
    justify-content: center; /* Centraliza os elementos verticalmente */
    gap: 5px; /* Reduzido o gap para caber melhor no espaço */
    margin-bottom: 10px;
    
}

.color-selector-item .pickr {
    flex: 1;
}

.color-selector-item .pickr button {
    width: 70px; /* Um pouco menor que o container */
    height: 70px; /* Mantém o aspecto quadrado */
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

.color-selector-item .remove-color {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 5px;
    width: 24px;
    height: 24px;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Customização do popup do Pickr */
.pickr .pcr-app {
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 4px;
}

.pickr .pcr-interaction input {
    font-family: monospace;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pickr .pcr-interaction .pcr-save {
    background: #007bff;
}

.pickr .pcr-interaction .pcr-clear {
    background: #dc3545;
}

/* Esconde o checkbox original */
.egs-checkbox-wrapper input[type="checkbox"] {
    display: none;
}

/* Container do switch */
.egs-checkbox-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Estilo do switch */
.egs-checkbox-wrapper label {
    position: relative;
    display: block;
    padding-left: 50px;
    cursor: pointer;
    line-height: 24px;
    margin-bottom: 5px;
}

.egs-checkbox-wrapper label:before {
    content: '';
    position: absolute;
    left: 0;
    width: 40px;
    height: 24px;
    background-color: #ccc;
    border-radius: 12px;
    transition: background-color 0.3s;
}

.egs-checkbox-wrapper label:after {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: left 0.3s;
}

/* Estado ativo */
.egs-checkbox-wrapper input[type="checkbox"]:checked + label:before {
    background-color: #2196F3;
}

.egs-checkbox-wrapper input[type="checkbox"]:checked + label:after {
    left: 18px;
}

/* Estilos para as variações */
.egs-variation-container, .egs-styles-preview-original {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.egs-variation-container .form-section-title {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-size: 36px;
    font-weight: bold;
}

.form-section-main-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 5px;
}

.egs-variation-container .egs-textarea-container {
    position: relative;
    margin-top: 10px;
}

.egs-variation-container textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.4;
    resize: vertical;
}

.egs-variation-container .egs-copy-btn {
}

.egs-variation-container:hover .egs-copy-btn {
    opacity: 1;
}

.egs-variation-container .egs-copy-btn:hover {
    background-color: #005880;
}

/* Animação suave ao mostrar as variações */
.egs-variation-container {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.egs-variation-container:nth-child(2) {
    animation-delay: 0.1s;
}

.egs-variation-container:nth-child(3) {
    animation-delay: 0.2s;
}

.form-section-variation-title {
    font-weight: normal;
    font-size: 28px;
    margin-bottom: 30px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos para o Preview */
.egs-styles-preview {
    flex: 1;
    background: #f8f8f8;
    border-radius: 8px;
    padding: 20px;
}

.egs-preview-section {
    margin-bottom: 20px;
}

.egs-preview-section h7 {
    display: block;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #666;
}

.egs-form-final-preview {
    margin-top: 30px;
}

.egs-color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.egs-color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.egs-color-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.egs-color-label {
    font-size: 12px;
    color: #666;
    text-align: center;
    max-width: 80px;
    word-break: break-all;
}

.egs-fonts-preview {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.egs-font-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.egs-font-label {
    font-size: 14px;
    color: #666;
}

.egs-font-preview {
    font-size: 24px;
    width: 100%;
    text-align: left;
    margin-bottom: 0px;
}

.egs-font-sample {
    font-size: 16px;
    line-height: 1.4;
    width: 100%;
    text-align: left;
    padding: 0 !important;
}

.egs-arrow-icon {
    color: #999;
    margin: 0 10px;
}

/* Ajustes para os containers */
.egs-textarea-container {
    margin-bottom: 20px;
}

.egs-textarea-container:last-child {
    margin-bottom: 0;
}

.egs-textarea-container h6,
.egs-form-column h6 {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: bold;
    color: #666;
}

/* Ajustes para o preview */
.egs-styles-preview {
    flex: 1;
    background: #f8f8f8;
    border-radius: 8px;
    padding: 20px;
}

/* Ajustes para as textareas */
.egs-textarea-container textarea {
    width: 100%;
    resize: vertical;
}

.egs-preview-columns {
    display: flex;
    gap: 30px;
    min-height: 450px; /* Define altura mínima */
}

.egs-preview-column {
    flex: 1;
    min-width: 0;
    max-height: 450px; /* Define altura máxima */
    padding-right: 30px;
    overflow-y: auto; /* Adiciona scrollbar vertical quando necessário */
}

/* Estilização opcional da scrollbar */
.egs-preview-column::-webkit-scrollbar {
    width: 8px;
}

.egs-preview-column::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.egs-preview-column::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.egs-preview-column::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Ajuste para garantir que as seções de preview não tenham margin-bottom quando dentro das colunas */
.egs-preview-column .egs-preview-section:last-child {
    margin-bottom: 0;
}

/* Accordion Styles */
.egs-accordion {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1em;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.egs-accordion-header {
    padding: 15px 20px;
    background-color: #f5f5f5;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.egs-accordion-header:hover {
    background-color: #eee;
}

.egs-accordion-header i {
    transition: transform 0.3s ease;
}

.egs-accordion-header i.fa-chevron-up {
    transform: rotate(180deg);
}

.egs-accordion-content {
    padding: 20px;
    border-top: 1px solid #ddd;
}

/* Fixed Copy Button Styles */
.egs-copy-btn-fixed {
    position: static !important;
    opacity: 1 !important;
    margin-bottom: 10px;
    background-color: #333;
    color: white;
    border: none;
    padding: 16px 30px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.egs-copy-btn-fixed:hover {
    background-color: #005880;
}

.egs-font-sample[contenteditable="true"] {
    cursor: text;
    padding: 8px;
    border: 1px solid transparent;
    transition: border-color 0.2s ease;
    font-weight: normal;
}

.egs-font-sample[contenteditable="true"]:hover {
    border-color: #ddd;
}

.egs-font-sample[contenteditable="true"]:focus {
    outline: none;
    border-color: #2196F3;
    background-color: rgba(33, 150, 243, 0.05);
}

.egs-step-title {
    border-bottom: 1px dotted #ccc;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Credits Balance */
.egs-credits-balance {
    margin-top: 30px;
    font-size: 14px;
    text-align: center;
    border-top: 1px solid #ccc;
    padding-top: 20px;  
    padding-bottom: 20px;
}

.egs-credits-balance-title {
    font-size: 14px;
    margin-bottom: 5px;
}

.egs-credits-balance-description {
    font-size: 12px;
    font-style: italic;
}

.egs-label {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

.egs-text-item {
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.egs-text-label {
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 5px;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.egs-text-content {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.egs-text-heading {
    font-size: 24px;
    font-weight: bold;
    line-height: 1.3;
}

.egs-text-subheading {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.egs-text-button {
    display: inline-block;
    padding: 5px 10px;
    background: #f0f0f0;
    border-radius: 3px;
    font-weight: 500;
}

.egs-text-link {
    color: #0073aa;
    text-decoration: underline;
}

/* Text Preview Styles */
.egs-text-content-wrapper {
    padding: 25px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1.6;
}

.egs-text-content-wrapper .egs-text-heading {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #2c3338;
    line-height: 1.3;
}

.egs-text-content-wrapper .egs-text-subheading {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #2c3338;
    line-height: 1.4;
}

.egs-text-content-wrapper .egs-text-paragraph {
    font-size: 14px;
    margin-bottom: 15px;
    color: #444;
}

.egs-text-content-wrapper .egs-text-button {
    display: inline-block;
    padding: 8px 16px;
    background: #f0f0f0;
    border-radius: 4px;
    font-weight: 500;
    margin: 5px 0;
    color: #333;
}

.egs-text-content-wrapper .egs-text-link {
    color: #0073aa;
    text-decoration: underline;
    margin: 5px 0;
    display: inline-block;
}

.egs-text-content-wrapper .egs-text-tab-title,
.egs-text-content-wrapper .egs-text-accordion-title {
    font-size: 18px;
    font-weight: 600;
    margin: 15px 0 10px;
    color: #2c3338;
}

.egs-text-content-wrapper .egs-text-quote {
    font-style: italic;
    padding: 15px;
    border-left: 4px solid #ddd;
    margin: 15px 0;
    background: #f9f9f9;
}

.egs-text-content-wrapper .egs-text-list {
    margin: 10px 0;
}

/* Espaçamento entre elementos */
.egs-text-content-wrapper > * {
    margin-bottom: 15px;
}

.egs-text-content-wrapper > *:last-child {
    margin-bottom: 0;
}

/* Ajustes específicos para o accordion de preview de texto */
#egs-parse-text-with-ai-step-2 .egs-accordion {
    margin-bottom: 30px;
}

#egs-parse-text-with-ai-step-2 .egs-accordion-header {
    background-color: #f8f8f8;
    transition: background-color 0.3s ease;
}

#egs-parse-text-with-ai-step-2 .egs-accordion-header:hover {
    background-color: #efefef;
}

#egs-parse-text-with-ai-step-2 .egs-accordion-content {
    background-color: #fff;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

#egs-parse-text-with-ai-step-2 .egs-text-preview {
    padding: 0;
}