.video-effects-host {
    display: grid;
    gap: 8px;
}

.video-effects-host > h4,
.video-effects-host > p {
    margin: 0;
}

.video-effects-host > p {
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.45;
}

.video-effects-controls {
    display: grid;
    gap: 10px;
}

.video-effects-choices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.video-effect-choice {
    position: relative;
    min-width: 0;
    min-height: 76px;
    display: grid;
    grid-template-rows: 48px auto;
    gap: 6px;
    overflow: hidden;
    padding: 4px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: #eef2f7;
    color: #0f172a;
    cursor: pointer;
    box-shadow: none;
}

.video-effect-custom-choices {
    display: contents;
}

.video-effect-choice:hover:not(:disabled),
.video-effect-choice:focus-visible,
.video-effect-choice.active {
    border-color: #2563eb;
    background: #eff6ff;
}

.video-effect-choice.applied::after {
    content: "Applied";
    position: absolute;
    top: 7px;
    right: 7px;
    padding: 2px 5px;
    border-radius: 999px;
    background: rgba(4, 120, 87, 0.92);
    color: #fff;
    font-size: 0.52rem;
    font-weight: 850;
    letter-spacing: 0.02em;
}

.video-effect-choice:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 2px;
}

.video-effect-choice:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.video-effect-choice img,
.video-effect-none,
.video-effect-blur,
.video-effect-upload {
    width: 100%;
    height: 48px;
    display: grid;
    place-items: center;
    object-fit: cover;
    border-radius: 8px;
}

.video-effect-none {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    color: #334155;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.video-effect-blur {
    background:
        radial-gradient(circle at 52% 42%, rgba(255, 255, 255, 0.92) 0 16%, transparent 17%),
        radial-gradient(circle at 50% 66%, rgba(255, 255, 255, 0.78) 0 25%, transparent 26%),
        linear-gradient(135deg, #60a5fa, #0f766e);
    color: white;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    filter: blur(0.6px);
}

.video-effect-blur.light {
    filter: blur(0.35px);
    opacity: 0.92;
}

.video-effect-blur.strong {
    filter: blur(1px);
}

.video-effect-upload {
    background: #ffffff;
    color: #2563eb;
    font-size: 1.6rem;
    font-weight: 500;
}

.video-effect-choice strong {
    overflow: hidden;
    padding: 0 3px 3px;
    font-size: 0.7rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-effects-status {
    min-height: 1.25em;
    margin: 0;
    color: #64748b;
    font-size: 0.75rem;
    line-height: 1.35;
}

.video-effect-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.video-effect-image-adjustments {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 9px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.video-effect-enhancements,
.video-effect-mask-tuning {
    margin: 0;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.7rem;
}

.video-effect-enhancements {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 12px;
}

.video-effect-enhancements legend {
    padding: 0 4px;
    color: #334155;
    font-size: 0.74rem;
    font-weight: 850;
}

.video-effect-enhancements label,
.video-effect-mask-tuning label {
    display: grid;
    gap: 4px;
    min-width: 0;
    font-weight: 750;
}

.video-effect-enhancements .video-effect-toggle {
    display: flex;
    align-items: center;
    gap: 7px;
}

.video-effect-enhancements input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.video-effect-enhancements input[type="range"],
.video-effect-mask-tuning input[type="range"] {
    width: 100%;
}

.video-effect-enhancements select {
    min-height: 44px;
    padding: 4px 7px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font: inherit;
}

.video-effect-green-screen-settings {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding-top: 2px;
}

.video-effect-green-screen-settings[hidden] {
    display: none;
}

.video-effect-mask-tuning summary {
    cursor: pointer;
    color: #334155;
    font-weight: 850;
}

.video-effect-mask-tuning > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding-top: 10px;
}

.video-effect-enhancements input:focus-visible,
.video-effect-enhancements select:focus-visible,
.video-effect-mask-tuning input:focus-visible,
.video-effect-mask-tuning summary:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 2px;
}

.video-effect-image-adjustments[hidden],
.video-effect-position-control[hidden] {
    display: none;
}

.video-effect-image-adjustments label {
    display: grid;
    gap: 4px;
    color: #475569;
    font-size: 0.68rem;
    font-weight: 750;
}

.video-effect-image-adjustments select,
.video-effect-image-adjustments input {
    width: 100%;
}

.video-effect-image-adjustments select {
    min-height: 44px;
    padding: 4px 7px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font: inherit;
}

.video-effect-image-adjustments select:focus-visible,
.video-effect-image-adjustments input:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 2px;
}

.video-effect-action {
    min-height: 44px;
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
}

.video-effect-action.primary {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

.video-effect-action.danger {
    border-color: #fecaca;
    color: #b91c1c;
}

.video-effect-action:hover:not(:disabled) {
    filter: brightness(0.97);
}

.video-effect-action:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 2px;
}

.video-effect-action:disabled {
    cursor: not-allowed;
    opacity: 0.52;
}

.video-effect-preview {
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #020617;
}

.video-effect-preview[hidden] {
    display: none;
}

.video-effect-preview video {
    width: 100%;
    max-height: 220px;
    display: block;
    object-fit: cover;
    background: #020617;
    transform: scaleX(-1);
}

.video-effect-preview p,
.video-effects-privacy {
    margin: 0;
    color: #64748b;
    font-size: 0.68rem;
    line-height: 1.4;
}

.video-effect-preview p {
    padding: 7px 9px;
    background: #fff;
}

.video-effects-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.video-effects-status[data-tone="ready"] {
    color: #047857;
}

.video-effects-status[data-tone="error"] {
    color: #b91c1c;
}

.video-effects-host[data-unsupported="true"] .video-effects-controls {
    opacity: 0.6;
}

@media (max-width: 620px) {
    .video-effects-choices {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .video-effect-image-adjustments {
        grid-template-columns: 1fr;
    }

    .video-effect-enhancements,
    .video-effect-green-screen-settings,
    .video-effect-mask-tuning > div {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .video-effect-choice,
    .video-effect-action {
        scroll-behavior: auto;
        transition: none;
    }
}
