fpd-module-ai-studio,
fpd-module-ai-studio .asd-module-root,
fpd-module-ai-studio .asd-panel {
    display: block;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.asd-dialog-content {
    overflow-y: auto;
    background: var(--fpd-primary-fg-color);
    height: 100%;
}

.asd-box {
    padding: 15px;
}

.asd-mode-switch {
    display: flex;
    width: 100%;
    margin-bottom: 14px;
    border: 1px solid var(--fpd-border-color, #ddd);
    border-radius: var(--fpd-border-radius, 6px);
    overflow: hidden;
}

.asd-mode {
    flex: 1 1 50%;
    min-width: 0;
    min-height: 44px;
    padding: 7px 5px;
    border: 0;
    background: transparent;
    color: var(--fpd-text-color, #222);
    font: inherit;
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
}

.asd-mode + .asd-mode {
    border-left: 1px solid var(--fpd-border-color, #ddd);
}

.asd-mode-active {
    background: #e7f4fd;
    color: #009ee5;
}

.asd-mode:focus-visible {
    outline: 2px solid #009ee5;
    outline-offset: -2px;
}

#asd-design-options[hidden],
#asd-remove-help[hidden] {
    display: none;
}

#asd-remove-help {
    margin: 12px 0 2px;
    color: var(--fpd-text-color, #444);
    font-size: 13px;
}

.asd-box label {
    display: block;
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--fpd-text-color);
    text-transform: uppercase;
}

.asd-box label:not(:first-child) {
    margin-top: 10px;
}

.asd-box input,
.asd-box textarea,
.asd-box select {
    width: 100%;
    box-sizing: border-box;
}

.asd-box textarea {
    min-height: 92px;
}

.asd-button {
    justify-content: center;
    margin-top: 12px !important;
}

.asd-secondary-button {
    width: 100%;
    border: 1px solid var(--fpd-border-color, #ddd);
    background: transparent;
    color: var(--fpd-text-color, #222);
    cursor: pointer;
}

#asd-retry-background[hidden] {
    display: none;
}

#asd-generate {
    width: 100%;
    border: 0;
    cursor: pointer;
}

.asd-button.asd-is-loading {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: wait;
    opacity: .9;
    pointer-events: none;
    text-align: center;
}

.asd-btn-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: asd-spin .8s linear infinite;
}

#asd-status {
    margin-top: 0;
}

#asd-preview {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--fpd-border-color);
}

#asd-preview[hidden] {
    display: none;
}

#asd-preview img {
    display: block;
    width: 100%;
    margin-top: 6px;
    border-radius: var(--fpd-border-radius);
    border: 1px solid var(--fpd-border-color);
    box-shadow: none;
}

.asd-error-box {
    margin-top: 12px;
    padding: 12px;
    border-radius: var(--fpd-border-radius);
    background: #fef2f2;
    color: #991b1b;
    text-align: center;
}

.asd-error-box strong {
    display: block;
    margin-bottom: 4px;
}

.asd-error-box span {
    display: block;
    margin-top: 4px;
}

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