/* CSS para interface live de tradução otimizada */

/* Elementos traduzíveis em modo live */
.ptlc-live-mode .ptlc-hoverable {
    position: relative;
    transition: background-color 0.2s ease;
}

.ptlc-live-mode .ptlc-hoverable:hover {
    background-color: #fff3cd !important;
    outline: 2px dashed #ffc107;
    cursor: pointer;
}

/* Elementos com data-ptlc sempre destacados */
.ptlc-translatable {
    background: #e8f4fd;
    border-radius: 3px;
    padding: 2px 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ptlc-translatable:hover {
    background: #d1ecf1;
}

/* Botão hover para tradução */
.ptlc-hover-btn {
    position: absolute !important;
    background: #0073aa !important;
    color: #fff !important;
    border: none !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    z-index: 99999 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    transition: background-color 0.2s ease !important;
    font-weight: bold !important;
}

.ptlc-hover-btn:hover {
    background: #005a87 !important;
}

/* Container de ações no hover */
.ptlc-hover-actions {
    position: absolute !important;
    display: flex !important;
    gap: 6px !important;
    z-index: 99999 !important;
}

.ptlc-hover-actions .ptlc-hover-btn {
    position: static !important;
}

.ptlc-hover-btn-inline {
    background: #f59e0b !important;
}

.ptlc-hover-btn-inline:hover {
    background: #d97706 !important;
}

.ptlc-inline-input {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    font-family: inherit !important;
    resize: vertical !important;
    min-height: 60px !important;
    transition: border-color 0.2s ease !important;
    color: black;
}

.ptlc-inline-input:focus {
    border-color: #f59e0b !important;
    outline: none !important;
    box-shadow: 0 0 0 1px rgba(245,158,11,0.2) !important;
}

.ptlc-inline-lang {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    background: #fff !important;
    color: #000 !important;
}

.ptlc-inline-help {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
}

/* Modal de tradução multilíngue */
.ptlc-popup {
    position: absolute;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 0;
    z-index: 999999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    min-width: 500px;
    max-width: 600px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.ptlc-multilang-popup {
    min-width: 600px;
    max-width: 700px;
}

.ptlc-popup-header {
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: #fff;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 16px;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid #e1e1e1;
}

.ptlc-multilang-form {
    padding: 20px;
}

.ptlc-key-info, .ptlc-original-text {
    background: #f8f9fa;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 4px;
    border-left: 4px solid #0073aa;
}

.ptlc-key-display {
    color: #0073aa;
    font-weight: 600;
    font-family: monospace;
}

.ptlc-form-group {
    margin-bottom: 20px;
}

.ptlc-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #23282d;
    font-weight: 600;
}

.ptlc-key-input {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 2px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-family: monospace !important;
    transition: border-color 0.2s ease !important;
    color: black !important;
}

.ptlc-key-input:focus {
    border-color: #0073aa !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.1) !important;
}

.ptlc-languages-container {
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 15px;
    background: #fafafa;
    margin-bottom: 20px;
}

.ptlc-lang-group {
    margin-bottom: 15px;
}

.ptlc-lang-group:last-child {
    margin-bottom: 0;
}

.ptlc-lang-group label {
    display: block;
    margin-bottom: 6px;
    color: #0073aa;
    font-weight: 600;
    font-size: 13px;
}

.ptlc-lang-input {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    font-family: inherit !important;
    resize: vertical !important;
    min-height: 60px !important;
    transition: border-color 0.2s ease !important;
    color: black;
}

.ptlc-lang-input:focus {
    border-color: #0073aa !important;
    outline: none !important;
    box-shadow: 0 0 0 1px rgba(0,115,170,0.2) !important;
}

.ptlc-popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e1e1e1;
    margin-top: 20px;
}

.ptlc-save-all, .ptlc-cancel {
    padding: 10px 20px !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

.ptlc-save-all {
    background: #00a32a !important;
    color: #fff !important;
}

.ptlc-save-all:hover {
    background: #008a20 !important;
    transform: translateY(-1px);
}

.ptlc-save-all:disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.ptlc-cancel {
    background: #f6f7f7 !important;
    color: #555 !important;
    border: 1px solid #ccd0d4 !important;
}

.ptlc-cancel:hover {
    background: #e8e8e8 !important;
    transform: translateY(-1px);
}

/* Notificações */
.ptlc-notification {
    position: fixed !important;
    top: 50px !important;
    right: 20px !important;
    z-index: 999999 !important;
    padding: 12px 20px !important;
    border-radius: 4px !important;
    color: #fff !important;
    font-size: 14px !important;
    max-width: 400px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
    animation: ptlc-slide-in 0.3s ease !important;
}

@keyframes ptlc-slide-in {
    from { 
        opacity: 0; 
        transform: translateX(100%); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

/* Indicador visual do modo live ativo */
.ptlc-live-mode::before {
    content: "Modo Tradução ATIVO - Passe o mouse sobre textos para traduzi-los";
    position: fixed;
    top: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: #d63638;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 99998;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    animation: ptlc-fade-in 0.3s ease;
}

@keyframes ptlc-fade-in {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .ptlc-popup, .ptlc-multilang-popup {
        min-width: 90vw;
        max-width: 95vw;
        margin: 10px;
    }
    
    .ptlc-live-mode::before {
        left: 10px;
        right: 10px;
        transform: none;
        text-align: center;
    }
    
    .ptlc-popup-actions {
        flex-direction: column;
    }
    
    .ptlc-notification {
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
    }
}

/* Seletor de Idiomas - Dropdown Style */
.ptlc-language-selector {
    position: relative;
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Dropdown */
.ptlc-dropdown {
    position: relative;
}

.ptlc-dropdown-toggle {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #fff;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
}

.ptlc-dropdown-toggle:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 8px rgba(0,115,170,0.15);
    transform: translateY(-1px);
    text-decoration: none;
}

.ptlc-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #0073aa;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,115,170,0.2);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.ptlc-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ptlc-lang-option {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f1f1f1;
    text-decoration: none;
    color: inherit;
}

.ptlc-lang-option:last-child {
    border-bottom: none;
}

.ptlc-lang-option:hover {
    background: #f8f9fa;
    color: #0073aa;
    text-decoration: none;
}

.lang-name {
    margin-right: 8px;
    font-size: 13px;
    color: #666;
}

.lang-code {
    font-weight: 600;
    color: #333;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.ptlc-lang-option:hover .lang-name,
.ptlc-lang-option:hover .lang-code {
    color: #0073aa;
}

.arrow {
    margin-left: 8px;
    font-size: 10px;
    color: #666;
    transition: transform 0.3s ease;
}

/* Estilo inline (horizontal) */
.ptlc-inline-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ptlc-inline-selector .ptlc-lang-option {
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    background: #fff;
    min-width: 70px;
    justify-content: center;
    padding: 8px 12px;
    margin: 0;
    text-align: center;
}

.ptlc-inline-selector .ptlc-lang-option.active {
    border-color: #0073aa;
    background: #0073aa;
    color: #fff;
}

.ptlc-inline-selector .ptlc-lang-option.active .lang-name,
.ptlc-inline-selector .ptlc-lang-option.active .lang-code {
    color: #fff;
}

/* Estilo lista (vertical) */
.ptlc-list-selector {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ptlc-list-selector .ptlc-lang-option {
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    background: #fff;
    padding: 8px 12px;
    margin: 0;
}

.ptlc-list-selector .ptlc-lang-option.active {
    border-color: #0073aa;
    background: #f8f9fa;
    color: #0073aa;
}

/* Estilo compacto */
.ptlc-language-selector.compact .ptlc-dropdown-toggle {
    padding: 6px 10px;
    min-width: 70px;
    font-size: 13px;
}

.ptlc-language-selector.compact .lang-name {
    font-size: 11px;
}

.ptlc-language-selector.compact .lang-code {
    font-size: 11px;
}

/* Responsive */
@media (max-width: 768px) {
    .ptlc-language-selector {
        width: 100%;
    }
    
    .ptlc-dropdown-toggle {
        width: 100%;
        justify-content: center;
    }
    
    .ptlc-inline-selector {
        justify-content: center;
    }
    
    .ptlc-inline-selector .ptlc-lang-option {
        flex: 1;
        min-width: 60px;
    }
}


.ptlc-inline-target {
    color: black;
    border: 1px solid #00000029;
}

.ptlc-inline-mode {
    color: black;
    border: 1px solid #00000029;
}