/* Convertor HTML in Imagine - seotoolpro.ro */

.hti-wrapper {
    background: #fff;
    border-radius: 10px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 24px;
}

/* Sectiune generica */
.hti-section {
    margin-bottom: 22px;
}

.hti-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #374151;
    font-size: 14px;
}

.hti-hint {
    font-weight: 400;
    color: #9ca3af;
    font-size: 13px;
}

/* Format buttons */
.hti-format-row {
    display: flex;
    gap: 10px;
}

.hti-fmt-btn {
    flex: 1;
    padding: 11px 0;
    border: 2px solid #7c3aed;
    background: #fff;
    color: #7c3aed;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.hti-fmt-btn.active,
.hti-fmt-btn:hover {
    background: #7c3aed;
    color: #fff;
}

/* Dimensiuni */
.hti-dim-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hti-dim-group {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 6px 12px;
    transition: border-color 0.2s;
}

.hti-dim-group:focus-within {
    border-color: #7c3aed;
}

.hti-dim-ico {
    font-size: 15px;
    color: #9ca3af;
}

.hti-dim-group input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 15px;
    color: #111827;
    width: 90px;
    font-weight: 500;
}

.hti-dim-unit {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

.hti-dim-sep {
    font-size: 20px;
    color: #d1d5db;
    font-weight: 300;
}

.hti-reset-dim-btn {
    padding: 9px 14px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.hti-reset-dim-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Textarea HTML */
.hti-textarea {
    width: 100%;
    min-height: 220px;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Courier New', Courier, monospace;
    color: #111827;
    box-sizing: border-box;
    resize: vertical;
    line-height: 1.6;
    transition: border-color 0.2s;
    outline: none;
    background: #fafafa;
}

.hti-textarea:focus {
    border-color: #7c3aed;
    background: #fff;
}

/* Butoane principale */
.hti-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.hti-btn-convert {
    flex: none;
    padding: 14px 20px;
    background: #7c3aed;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hti-btn-convert:hover {
    background: #6d28d9;
}

.hti-btn-convert:active {
    transform: scale(0.98);
}

.hti-btn-undo {
    padding: 14px 18px;
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.hti-btn-undo:hover:not(:disabled) {
    background: #e5e7eb;
    color: #374151;
}

.hti-btn-undo:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.hti-btn-ico {
    font-size: 17px;
}

/* Loader */
.hti-loader {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: #f9fafb;
    border-radius: 8px;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 16px;
}

.hti-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e5e7eb;
    border-top-color: #7c3aed;
    border-radius: 50%;
    animation: hti-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes hti-spin {
    to { transform: rotate(360deg); }
}

/* Eroare */
.hti-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 13px;
    color: #b91c1c;
    margin-bottom: 16px;
}

/* Rezultat */
.hti-result {
    animation: hti-fadeIn 0.3s ease;
}

@keyframes hti-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hti-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.hti-result-title {
    font-size: 15px;
    font-weight: 700;
    color: #059669;
}

.hti-result-meta {
    font-size: 12px;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 20px;
}

.hti-preview-box {
    border: 2px dashed #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    background: repeating-conic-gradient(#f0f0f0 0% 25%, #fff 0% 50%) 0 0 / 20px 20px;
    margin-bottom: 16px;
    overflow: auto;
}

.hti-preview-box img {
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: block;
    margin: 0 auto;
}

.hti-result-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.hti-btn-download {
    width: 100%;
    padding: 12px;
    background: #059669;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.hti-btn-download:hover {
    background: #047857;
}

.hti-btn-new {
    width: 100%;
    padding: 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0;
}

.hti-btn-new:hover {
    background: #e5e7eb;
    color: #374151;
}

@media (max-width: 600px) {
    .hti-wrapper {
        padding: 18px;
    }

    .hti-actions,
    .hti-result-actions {
        flex-direction: column;
    }

    .hti-dim-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .hti-dim-sep {
        display: none;
    }

    .hti-format-row {
        gap: 6px;
    }
}