/* Gerador de Textos Promocionais - WordPress Plugin Styles */

.gerador-textos-wrapper {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #111;
    margin: 20px 0;
}

.gerador-textos-wrapper * {
    box-sizing: border-box;
}

.gerador-container {
    max-width: 1000px;
    margin: 0 auto;
}

.gerador-header {
    text-align: center;
    margin-bottom: 30px;
}

.gerador-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #3a86ff;
    font-weight: 700;
}

.gerador-subtitle {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
}

.gerador-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #e5e7eb;
}

.gerador-card-title {
    font-size: 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #111;
}

.gerador-card label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #111;
}

.gerador-card textarea,
.gerador-card input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    font-family: inherit;
}

.gerador-card textarea:focus,
.gerador-card input:focus {
    outline: none;
    border-color: #3a86ff;
    box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.2);
}

.gerador-card textarea {
    min-height: 120px;
    resize: vertical;
}

.gerador-row {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.gerador-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
}

.gerador-btn:hover {
    transform: translateY(-2px);
}

.gerador-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.gerador-btn-primary {
    background: #3a86ff;
    color: white;
}

.gerador-btn-primary:hover {
    background: #2563eb;
}

.gerador-btn-secondary {
    background: #6b7280;
    color: white;
}

.gerador-btn-secondary:hover {
    background: #4b5563;
}

.gerador-btn-success {
    background: #10b981;
    color: white;
}

.gerador-btn-success:hover {
    background: #059669;
}

.gerador-btn-warning {
    background: #f59e0b;
    color: white;
}

.gerador-btn-warning:hover {
    background: #d97706;
}

.gerador-btn-danger {
    background: #ef4444;
    color: white;
}

.gerador-btn-danger:hover {
    background: #dc2626;
}

.gerador-btn-copied {
    background: #10b981 !important;
}

.gerador-hint {
    background: #fff3cd;
    border-left: 4px solid #ffe69c;
    padding: 12px;
    border-radius: 6px;
    margin-top: 16px;
    font-size: 14px;
}

.gerador-tag {
    display: inline-block;
    background: #eef2ff;
    color: #0b63d6;
    padding: 4px 8px;
    border-radius: 999px;
    margin-right: 6px;
    font-size: 12px;
    font-weight: 600;
}

.gerador-extracted-data {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
    background: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    border: 1px dashed #e5e7eb;
}

.gerador-data-item {
    display: flex;
    flex-direction: column;
}

.gerador-data-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 500;
}

.gerador-data-value {
    font-weight: 600;
    word-break: break-all;
    color: #111;
}

.gerador-results {
    margin-top: 24px;
}

.gerador-result {
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    position: relative;
}

.gerador-result-content {
    white-space: pre-wrap;
    margin: 0 0 12px 0;
    font-family: inherit;
    line-height: 1.6;
    color: #111;
}

.gerador-result-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gerador-history {
    margin-top: 30px;
}

.gerador-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.gerador-history h2 {
    margin: 0;
    font-size: 24px;
    color: #111;
}

.gerador-search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.gerador-search-box input {
    flex: 1;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.gerador-search-box input:focus {
    outline: none;
    border-color: #3a86ff;
    box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.2);
}

.gerador-history-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.gerador-history-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.gerador-history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.gerador-history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 15px;
}

.gerador-history-item-title {
    font-weight: 600;
    color: #111;
    flex: 1;
}

.gerador-history-item-price {
    color: #10b981;
    font-weight: 600;
    white-space: nowrap;
}

.gerador-history-item-date {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
}

.gerador-history-item-content {
    white-space: pre-wrap;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
    max-height: 100px;
    overflow: hidden;
    position: relative;
    color: #374151;
}

.gerador-history-item-content:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 100%);
}

.gerador-history-item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gerador-pagination {
    text-align: center;
    margin-top: 20px;
}

.gerador-empty-history {
    text-align: center;
    padding: 40px;
    color: #6b7280;
    font-style: italic;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px dashed #e5e7eb;
}

.gerador-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 1000;
    font-weight: 500;
    max-width: 300px;
}

.gerador-toast-show {
    opacity: 1;
    transform: translateY(0);
}

.gerador-toast-success {
    background: #10b981;
    color: white;
}

.gerador-toast-error {
    background: #ef4444;
    color: white;
}

.gerador-toast-warning {
    background: #f59e0b;
    color: white;
}

/* Responsividade */
@media (max-width: 768px) {
    .gerador-row {
        flex-direction: column;
    }
    
    .gerador-extracted-data {
        grid-template-columns: 1fr;
    }
    
    .gerador-result-actions,
    .gerador-history-item-actions {
        flex-direction: column;
    }
    
    .gerador-history-item-header {
        flex-direction: column;
        gap: 5px;
    }
    
    .gerador-history-item-price {
        align-self: flex-start;
    }
    
    .gerador-search-box {
        flex-direction: column;
    }
    
    .gerador-history-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .gerador-toast {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

/* Compatibilidade com Elementor */
.elementor-widget-container .gerador-textos-wrapper {
    margin: 0;
}

.elementor-widget-container .gerador-container {
    max-width: none;
}

/* Reset de estilos que podem conflitar */
.gerador-textos-wrapper h1,
.gerador-textos-wrapper h2,
.gerador-textos-wrapper p,
.gerador-textos-wrapper div,
.gerador-textos-wrapper button,
.gerador-textos-wrapper input,
.gerador-textos-wrapper textarea {
    margin: 0;
    padding: 0;
}

.gerador-textos-wrapper button,
.gerador-textos-wrapper input,
.gerador-textos-wrapper textarea {
    font-family: inherit;
}

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

.gerador-history-item {
    animation: gerador-fadeIn 0.3s ease-out;
}

.gerador-result {
    animation: gerador-fadeIn 0.3s ease-out;
}

