/**
 * HLP7 Support Form v2.1
 * Design: Variante B - Randlos/Fließend
 * Mobile-first, Desktop optimiert
 */

/* ===== RESET & VARIABLEN ===== */
.hlp7-support-wrapper,
.hlp7-support-wrapper * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.hlp7-support-wrapper {
    --primary: #8B9680;
    --primary-hover: #7a8670;
    --primary-light: rgba(139, 150, 128, 0.1);
    --primary-lighter: rgba(139, 150, 128, 0.05);
    --bg: #F5F3ED;
    --card: #ffffff;
    --border: #E8E5E0;
    --text: #2C2C2C;
    --text-light: #666666;
    --text-muted: #999999;
    --success: #4caf50;
    --success-light: #E8F5E9;
    --error: #c0392b;
    --error-light: #FDEDED;
    --warning: #D97706;
    --warning-light: #FEF3E7;
    --radius: 8px;
    --radius-lg: 12px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    
    font-family: var(--font);
    color: var(--text);
    line-height: 1.6;
    max-width: 680px;
    margin: 0 auto;
    padding: 0;
}

/* ===== FORM - RANDLOS ===== */
.hlp7-form {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

/* ===== HEADER ===== */
.hlp7-header {
    margin-bottom: 2.5rem;
}

.hlp7-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.hlp7-header p {
    font-size: 1rem;
    color: var(--text-light);
    margin: 0;
}

/* ===== SECTIONS ===== */
.hlp7-section {
    margin-bottom: 2rem;
}

/* ===== LABELS ===== */
.hlp7-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hlp7-req {
    color: var(--error);
}

.hlp7-opt {
    font-weight: 400;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
}

/* ===== KATEGORIE GRID - RANDLOS ===== */
.hlp7-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.hlp7-cat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.hlp7-cat-card:hover {
    border-color: var(--primary);
    background: var(--primary-lighter);
}

.hlp7-cat-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hlp7-cat-card.active,
.hlp7-cat-card:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.hlp7-cat-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 0.75rem;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: all 0.2s ease;
}

.hlp7-cat-icon svg {
    width: 22px;
    height: 22px;
}

.hlp7-cat-card:hover .hlp7-cat-icon {
    color: var(--primary);
}

.hlp7-cat-card.active .hlp7-cat-icon,
.hlp7-cat-card:has(input:checked) .hlp7-cat-icon {
    background: var(--primary);
    color: white;
}

.hlp7-cat-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.3;
}

/* ===== TIP BOX - SUBTILER ===== */
.hlp7-tip {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--warning-light);
    border-radius: var(--radius);
    margin-bottom: 2rem;
    align-items: center;
}

.hlp7-tip svg {
    width: 20px;
    height: 20px;
    color: var(--warning);
    flex-shrink: 0;
}

.hlp7-tip p {
    font-size: 0.9rem;
    color: #92400E;
    margin: 0;
}

.hlp7-tip strong {
    font-weight: 600;
}

/* ===== FORM FIELDS - CLEANER ===== */
.hlp7-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.hlp7-field {
    margin-bottom: 0;
}

.hlp7-field:last-child {
    margin-bottom: 0;
}

/* Field Labels inline */
.hlp7-field > .hlp7-label {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    color: var(--text);
}

.hlp7-input,
.hlp7-select,
.hlp7-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: var(--font);
    color: var(--text);
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 50px;
    line-height: 1.4;
}

.hlp7-input,
.hlp7-select {
    height: 50px;
}

.hlp7-textarea {
    height: auto;
    min-height: 140px;
    resize: vertical;
}

.hlp7-input:focus,
.hlp7-select:focus,
.hlp7-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.hlp7-input[readonly] {
    background: var(--bg);
    color: var(--text-light);
    cursor: default;
    border-color: transparent;
}

.hlp7-input::placeholder,
.hlp7-textarea::placeholder {
    color: var(--text-muted);
}

.hlp7-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3e%3cpath fill='%23666' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.hlp7-textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}

/* ===== FILE UPLOAD - SUBTILER ===== */
.hlp7-upload {
    position: relative;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem 1rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    background: transparent;
}

.hlp7-upload:hover,
.hlp7-upload.dragover {
    border-color: var(--primary);
    background: var(--primary-lighter);
}

.hlp7-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.hlp7-upload-content svg {
    width: 36px;
    height: 36px;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.hlp7-upload:hover .hlp7-upload-content svg {
    color: var(--primary);
}

.hlp7-upload-content p {
    margin: 0 0 0.25rem 0;
    color: var(--text);
    font-size: 0.95rem;
}

.hlp7-upload-content span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* File List */
.hlp7-files {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.hlp7-file {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg);
    border-radius: var(--radius);
    font-size: 0.85rem;
}

.hlp7-file svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
    flex-shrink: 0;
}

.hlp7-file-name {
    color: var(--text);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hlp7-file-size {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.hlp7-file-remove {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    display: flex;
}

.hlp7-file-remove:hover {
    color: var(--error);
}

.hlp7-file-remove svg {
    width: 14px;
    height: 14px;
}

/* ===== ERROR MESSAGE ===== */
.hlp7-error {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--error-light);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.hlp7-error svg {
    width: 20px;
    height: 20px;
    color: var(--error);
    flex-shrink: 0;
}

.hlp7-error-text {
    color: var(--error);
    font-size: 0.9rem;
}

/* ===== BUTTONS ===== */
.hlp7-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.hlp7-btn svg {
    width: 20px;
    height: 20px;
}

.hlp7-btn-primary {
    background: var(--primary);
    color: white;
    width: 100%;
}

.hlp7-btn-primary:hover {
    background: var(--primary-hover);
}

.hlp7-btn-primary:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

.hlp7-btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.hlp7-btn-outline:hover {
    background: var(--primary-light);
}

/* Loading Spinner */
.hlp7-spinner {
    width: 20px;
    height: 20px;
    animation: hlp7-spin 1s linear infinite;
}

@keyframes hlp7-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== ACTIONS ===== */
.hlp7-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.hlp7-privacy {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

.hlp7-privacy a {
    color: var(--primary);
    text-decoration: underline;
}

/* ===== SUCCESS MESSAGE ===== */
.hlp7-success {
    text-align: center;
    padding: 2rem 0;
}

.hlp7-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.5rem;
    background: var(--success-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
}

.hlp7-success-icon svg {
    width: 40px;
    height: 40px;
}

.hlp7-success h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

.hlp7-success p {
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.hlp7-ticket-info {
    font-size: 1.1rem;
    color: var(--text);
}

.hlp7-ticket-info strong {
    color: var(--primary);
    font-size: 1.25rem;
}

.hlp7-response-info {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.hlp7-response-info svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.hlp7-new-ticket {
    margin-top: 2rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .hlp7-support-wrapper {
        padding: 0 1rem;
    }
    
    .hlp7-header h1 {
        font-size: 1.5rem;
    }
    
    .hlp7-header p {
        font-size: 0.9rem;
    }
    
    .hlp7-categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .hlp7-cat-card {
        padding: 1.25rem 0.75rem;
    }
    
    .hlp7-cat-icon {
        width: 40px;
        height: 40px;
    }
    
    .hlp7-cat-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .hlp7-cat-name {
        font-size: 0.8rem;
    }
    
    .hlp7-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .hlp7-row .hlp7-field {
        margin-bottom: 1rem;
    }
    
    .hlp7-tip {
        padding: 1rem;
    }
    
    .hlp7-upload {
        padding: 1.5rem 1rem;
    }
    
    .hlp7-btn {
        padding: 0.875rem 1.5rem;
    }
    
    .hlp7-success-icon {
        width: 60px;
        height: 60px;
    }
    
    .hlp7-success-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .hlp7-success h2 {
        font-size: 1.25rem;
    }
    
    .hlp7-response-info {
        flex-direction: column;
        gap: 0.25rem;
        padding: 1rem;
        border-radius: var(--radius);
    }
}

/* ===== FAQ SECTION ===== */
.hlp7-faq-section {
    margin-bottom: 2rem;
}

.hlp7-faq-container {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.hlp7-faq-header {
    padding: 1rem 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hlp7-faq-header svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
    flex-shrink: 0;
}

.hlp7-faq-header span {
    font-weight: 500;
    color: var(--text);
    font-size: 0.95rem;
}

.hlp7-faq-category {
    color: var(--primary);
}

/* FAQ Items */
.hlp7-faq-item {
    border-bottom: 1px solid var(--border);
}

.hlp7-faq-item:last-child {
    border-bottom: none;
}

.hlp7-faq-question {
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
    gap: 1rem;
}

.hlp7-faq-question:hover {
    background: #fafafa;
}

.hlp7-faq-question-text {
    font-weight: 500;
    color: var(--text);
    flex: 1;
}

.hlp7-faq-toggle {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.hlp7-faq-item.open .hlp7-faq-toggle {
    transform: rotate(180deg);
}

.hlp7-faq-answer {
    display: none;
    padding: 0 1.25rem 1.25rem;
}

.hlp7-faq-item.open .hlp7-faq-answer {
    display: block;
}

.hlp7-faq-answer-content {
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-light);
}

.hlp7-faq-answer-content p {
    margin-bottom: 0.75rem;
}

.hlp7-faq-answer-content p:last-child {
    margin-bottom: 0;
}

.hlp7-faq-answer-content ol,
.hlp7-faq-answer-content ul {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.hlp7-faq-answer-content li {
    margin-bottom: 0.5rem;
}

.hlp7-faq-answer-content strong {
    color: var(--text);
}

.hlp7-faq-answer-content code {
    background: rgba(0,0,0,0.05);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.85em;
}

.hlp7-faq-answer-content a {
    color: var(--primary);
}

/* FAQ Video */
.hlp7-faq-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
    margin: 1rem 0;
}

.hlp7-faq-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* FAQ Meta */
.hlp7-faq-meta {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hlp7-faq-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.hlp7-faq-meta svg {
    width: 14px;
    height: 14px;
}

/* FAQ Helpful */
.hlp7-faq-helpful {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.hlp7-faq-helpful-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

.hlp7-faq-helpful-btns {
    display: flex;
    gap: 0.5rem;
}

.hlp7-faq-helpful-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
}

.hlp7-faq-helpful-btn:hover {
    border-color: var(--primary);
}

.hlp7-faq-helpful-btn svg {
    width: 16px;
    height: 16px;
}

.hlp7-faq-helpful-btn.yes:hover {
    background: var(--success-light);
    border-color: var(--success);
    color: var(--success);
}

.hlp7-faq-helpful-btn.no:hover {
    background: var(--error-light);
    border-color: var(--error);
    color: var(--error);
}

.hlp7-faq-helpful-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hlp7-faq-helpful-thanks {
    font-size: 0.85rem;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.hlp7-faq-helpful-thanks svg {
    width: 16px;
    height: 16px;
}

/* FAQ Not Found */
.hlp7-faq-not-found {
    padding: 1rem 1.25rem;
    background: var(--warning-light);
    cursor: pointer;
    transition: background 0.2s;
}

.hlp7-faq-not-found:hover {
    background: #FFECB3;
}

.hlp7-faq-not-found label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text);
}

.hlp7-faq-not-found input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

/* FAQ Loading */
.hlp7-faq-loading {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.hlp7-faq-loading svg {
    width: 24px;
    height: 24px;
    animation: hlp7-spin 1s linear infinite;
    margin-bottom: 0.5rem;
}

/* FAQ Empty */
.hlp7-faq-empty {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ===== RESPONSIVE FAQ ===== */
@media (max-width: 640px) {
    .hlp7-faq-header {
        padding: 0.875rem 1rem;
    }
    
    .hlp7-faq-header span {
        font-size: 0.9rem;
    }
    
    .hlp7-faq-question {
        padding: 0.875rem 1rem;
    }
    
    .hlp7-faq-question-text {
        font-size: 0.95rem;
    }
    
    .hlp7-faq-answer {
        padding: 0 1rem 1rem;
    }
    
    .hlp7-faq-answer-content {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    .hlp7-faq-helpful {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .hlp7-faq-not-found {
        padding: 0.875rem 1rem;
    }
    
    .hlp7-faq-not-found label {
        font-size: 0.9rem;
    }
}
