/* FYEV Legal Forms v2 - shadcn/ui compatible */

.fyev-legal-forms-wrapper {
    margin: 20px 0;
    padding-top: 20px;
    border-top: 1px solid hsl(var(--border, 240 5.9% 90%));
}
.fyev-legal-forms-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: hsl(var(--foreground, 240 10% 3.9%));
}

/* Form Block */
.fyev-form-block {
    margin-bottom: 12px;
    border: 1px solid hsl(var(--border, 240 5.9% 90%));
    border-radius: var(--radius, 0.5rem);
    background: hsl(var(--card, 0 0% 100%));
    overflow: hidden;
}
.fyev-form-block.fyev-error {
    border-color: hsl(var(--destructive, 0 84.2% 60.2%));
    box-shadow: 0 0 0 1px hsl(var(--destructive, 0 84.2% 60.2%));
}

/* Header toggle */
.fyev-form-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: hsl(var(--muted, 240 4.8% 95.9%));
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground, 240 10% 3.9%));
}
.fyev-form-header:hover {
    background: hsl(var(--accent, 240 4.8% 95.9%));
}
.fyev-form-toggle-icon {
    font-size: 0.7em;
    transition: transform 0.2s;
    color: hsl(var(--muted-foreground, 240 3.8% 46.1%));
}
.fyev-form-header.open .fyev-form-toggle-icon {
    transform: rotate(90deg);
}
.fyev-form-header.open {
    border-bottom: 1px solid hsl(var(--border, 240 5.9% 90%));
}

/* Expandable content */
.fyev-form-expandable {
    max-height: 350px;
    overflow-y: auto;
    padding: 16px 20px;
    font-size: 0.85rem;
    line-height: 1.65;
    color: hsl(var(--card-foreground, 240 10% 3.9%));
    border-bottom: 1px solid hsl(var(--border, 240 5.9% 90%));
}
.fyev-form-expandable h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 10px;
}
.fyev-form-expandable p { margin: 0 0 8px; }
.fyev-form-expandable strong { color: hsl(var(--foreground, 240 10% 3.9%)); }

/* Tables */
.fyev-info-table, .fyev-product-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 12px;
    font-size: 0.85rem;
}
.fyev-info-table td, .fyev-product-table td, .fyev-product-table th {
    padding: 5px 8px;
    border: 1px solid hsl(var(--border, 240 5.9% 90%));
    vertical-align: top;
}
.fyev-info-table td:first-child {
    font-weight: 500;
    width: 30%;
    background: hsl(var(--muted, 240 4.8% 95.9%));
    white-space: nowrap;
}
.fyev-product-table th {
    background: hsl(var(--muted, 240 4.8% 95.9%));
    font-weight: 500;
    text-align: left;
}

/* Placeholder */
.fyev-placeholder {
    color: hsl(var(--muted-foreground, 240 3.8% 46.1%));
    font-style: italic;
}

/* Checkbox */
.fyev-form-checkbox-row {
    padding: 10px 16px;
}
.fyev-form-checkbox-row label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.875rem;
    line-height: 1.4;
    cursor: pointer;
    color: hsl(var(--foreground, 240 10% 3.9%));
}
.fyev-form-checkbox-row input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    accent-color: hsl(var(--primary, 240 5.9% 10%));
}
.fyev-form-checkbox-row .required {
    color: hsl(var(--destructive, 0 84.2% 60.2%));
    text-decoration: none;
}

/* Ticari channels */
.fyev-ticari-channels {
    padding: 6px 16px 14px 42px;
}
.fyev-channel-title {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
}
.fyev-ticari-channels label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    padding: 3px 0;
    cursor: pointer;
}

/* Validation error */
.fyev-validation-error {
    color: hsl(var(--destructive, 0 84.2% 60.2%));
    font-size: 0.8rem;
    padding: 2px 16px 8px;
}

.fyev-form-date {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid hsl(var(--border, 240 5.9% 90%));
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground, 240 3.8% 46.1%));
}

/* Scrollbar */
.fyev-form-expandable::-webkit-scrollbar { width: 5px; }
.fyev-form-expandable::-webkit-scrollbar-track { background: hsl(var(--muted, 240 4.8% 95.9%)); }
.fyev-form-expandable::-webkit-scrollbar-thumb { background: hsl(var(--border, 240 5.9% 90%)); border-radius: 3px; }

/* Mobile */
@media (max-width: 600px) {
    .fyev-form-expandable { max-height: 250px; padding: 12px; font-size: 0.82rem; }
    .fyev-info-table td:first-child { width: 35%; }
}

/* Admin */
.fyev-admin-consents { margin-top: 15px; padding: 10px; background: #f9f9f9; border: 1px solid #ddd; }
.fyev-admin-consents h3 { margin: 0 0 10px; font-size: 1em; }
.fyev-admin-consents p { margin: 4px 0; font-size: 0.92em; }


/* Select2 dropdown fix (mobile / z-index issues) */
.select2-container { z-index: 10000; }
.select2-container--open { z-index: 100000; }
.select2-dropdown { z-index: 100000; }
