/* Gerador de Assinatura de E-mail - Estilos */

.esg-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.esg-title {
    font-size: 28px;
    font-weight: 700;
    color: #2A503E;
    margin-bottom: 10px;
    text-align: center;
}

.esg-description {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.5;
}

.esg-form {
    margin-bottom: 30px;
}

.esg-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.esg-form-group {
    flex: 1;
}

.esg-form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.esg-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.esg-form-group input:focus {
    outline: none;
    border-color: #2A503E;
    box-shadow: 0 0 0 3px rgba(42, 80, 62, 0.1);
}

.esg-form-group input::placeholder {
    color: #999;
}

.esg-form-actions {
    text-align: center;
    margin-top: 30px;
}

.esg-btn {
    display: inline-block;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 10px 10px 0;
    position: relative;
    overflow: hidden;
}

.esg-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.esg-btn-primary {
    background: linear-gradient(135deg, #2A503E 0%, #3d6b52 100%);
    color: white;
}

.esg-btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.esg-btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    color: white;
}

.esg-btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.esg-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.esg-result-section {
    margin-top: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.esg-result-title {
    font-size: 24px;
    font-weight: 700;
    color: #2A503E;
    margin-bottom: 10px;
    text-align: center;
}

.esg-result-description {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin-bottom: 25px;
}

.esg-preview-container {
    margin-bottom: 25px;
}

.esg-preview-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 14px;
}

.esg-signature-preview {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    min-height: 150px;
    overflow: auto;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.esg-result-actions {
    text-align: center;
    margin-bottom: 20px;
}

.esg-instructions {
    margin-top: 40px;
    padding: 25px;
    background: #e8f4f8;
    border-radius: 8px;
    border-left: 4px solid #2A503E;
}

.esg-instructions h4 {
    color: #2A503E;
    margin-bottom: 15px;
    font-size: 18px;
}

.esg-instructions ol {
    margin-left: 20px;
    line-height: 1.6;
}

.esg-instructions li {
    margin-bottom: 8px;
    color: #555;
}

.esg-instructions strong {
    color: #2A503E;
}

.esg-instructions p {
    margin-top: 15px;
    margin-bottom: 0;
}

.esg-instructions small {
    color: #666;
    font-style: italic;
}

/* Responsividade */
@media (max-width: 768px) {
    .esg-container {
        margin: 10px;
        padding: 20px;
    }
    
    .esg-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .esg-title {
        font-size: 24px;
    }
    
    .esg-btn {
        display: block;
        width: 100%;
        margin: 0 0 10px 0;
    }
    
    .esg-result-actions .esg-btn {
        display: inline-block;
        width: auto;
        margin: 0 5px 10px 0;
    }
}

@media (max-width: 480px) {
    .esg-result-actions .esg-btn {
        display: block;
        width: 100%;
        margin: 0 0 10px 0;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.esg-result-section {
    animation: fadeIn 0.5s ease-out;
}

/* Estados de loading */
.esg-btn.loading .esg-btn-text {
    opacity: 0;
}

.esg-btn.loading .esg-loading {
    opacity: 1;
}

.esg-btn:not(.loading) .esg-loading {
    opacity: 0;
}

/* Estados de copiado */
.esg-btn.copied .esg-copy-text {
    display: none;
}

.esg-btn.copied .esg-copied-text {
    display: inline !important;
}

/* Melhorias visuais */
.esg-form-group input:valid {
    border-color: #28a745;
}

.esg-form-group input:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

/* Efeitos hover nos campos */
.esg-form-group input:hover:not(:focus) {
    border-color: #c6cbd1;
}

/* Estilo para campos obrigatórios */
.esg-form-group label::after {
    content: "";
}

.esg-form-group:has(input[required]) label::after {
    content: " *";
    color: #dc3545;
}



/* Estilos para textarea */
.esg-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
    resize: vertical;
    min-height: 80px;
    line-height: 1.4;
}

.esg-form-group textarea:focus {
    outline: none;
    border-color: #2A503E;
    box-shadow: 0 0 0 3px rgba(42, 80, 62, 0.1);
}

.esg-form-group textarea::placeholder {
    color: #999;
}

/* Estilos para upload de logo */
.esg-logo-upload {
    width: 100%;
}

.esg-upload-container {
    position: relative;
}

.esg-upload-btn {
    display: inline-block;
    padding: 12px 20px;
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.esg-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.esg-upload-btn.loading .esg-upload-text {
    display: none;
}

.esg-upload-btn.loading .esg-upload-loading {
    display: inline !important;
}

.esg-logo-preview {
    position: relative;
    display: inline-block;
    margin-top: 10px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 10px;
    background: #f8f9fa;
}

.esg-logo-preview img {
    max-width: 150px;
    max-height: 100px;
    display: block;
    border-radius: 4px;
}

.esg-remove-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.esg-remove-btn:hover {
    background: #c82333;
}

.esg-upload-info {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}

/* Responsividade para novos campos */
@media (max-width: 768px) {
    .esg-logo-upload {
        margin-bottom: 20px;
    }
    
    .esg-logo-preview img {
        max-width: 120px;
        max-height: 80px;
    }
}

/* Validação para novos campos */
.esg-form-group textarea:valid {
    border-color: #28a745;
}

.esg-form-group textarea:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

.esg-form-group input[type="url"]:valid {
    border-color: #28a745;
}

.esg-form-group input[type="url"]:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

/* Hover para novos campos */
.esg-form-group textarea:hover:not(:focus) {
    border-color: #c6cbd1;
}

.esg-form-group input[type="url"]:hover:not(:focus) {
    border-color: #c6cbd1;
}

