/**
 * DigiBlocks Admin Styles
 */

/* Reset and Base Styles */
.digiblocks-admin-wrap {
    display: flex;
    flex-direction: column;
    margin: 1.25rem 1.25rem 0 0;
    color: #1e1e1e;
}

body.rtl .digiblocks-admin-wrap {
    margin-right: 1.25rem;
    margin-left: 0;
}

.digiblocks-admin-wrap * {
    box-sizing: border-box;
}

/* Admin Header */
.digiblocks-admin-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.875rem;
    padding-bottom: 0.9375rem;
    border-bottom: 0.0625rem solid #e2e4e7;
}

.digiblocks-admin-logo {
    display: flex;
}

/* Admin Tabs */
.digiblocks-admin-tabs {
    display: flex;
}

.digiblocks-admin-tabs a {
    display: inline-flex;
    padding: 0.625rem 1.125rem;
    margin: 0 0.25rem;
    text-decoration: none;
    color: #50575e;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.digiblocks-admin-tabs a:hover {
    color: #526bfe;
    background-color: rgba(82, 107, 254, 0.05);
}

.digiblocks-admin-tabs a.active {
    color: #fff;
    background-color: #526bfe;
    box-shadow: 0 0.1875rem 0.375rem rgba(82, 107, 254, 0.25);
}

/* Admin Content */
.digiblocks-admin-content {
    display: flex;
    gap: 1.875rem;
}

/* Admin columns */
.digiblocks-admin-col {
    display: flex;
    flex-direction: column;
    gap: 1.875rem;
}

.digiblocks-admin-first {
    flex: 1;
}

.digiblocks-admin-second {
    max-width: 35%;
}

/* Admin Sections */
.digiblocks-admin-section {
    background-color: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.digiblocks-section-header {
    padding: 1.5rem 1.75rem;
    border-bottom: 0.0625rem solid #f0f0f0;
    background: linear-gradient(
        to right,
        rgba(82, 107, 254, 0.03),
        rgba(82, 107, 254, 0)
    );

    h2 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 600;
        color: #333;

        &.has-icon {
            display: flex;
            align-items: center;
            gap: 0.5rem;

            svg {
                width: 1.5rem;
                height: 1.5rem;
            }
        }
    }

    p {
        margin: 0.5rem 0 0;
        color: #646970;
        font-size: 0.875rem;
        line-height: 1.5;
    }
}

/* Block Cards */
.digiblocks-blocks-container {
    padding: 1.75rem;
}

.digiblocks-blocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
    gap: 1.5rem;
}

.digiblocks-block-card {
    position: relative;
    border: 0.0625rem solid #e2e4e7;
    border-radius: 0.625rem;
    overflow: hidden;
    transition: all 0.2s ease;
    background-color: #fff;
}

.digiblocks-block-card:hover {
    border-color: #526bfe;
    box-shadow: 0 0.25rem 0.75rem rgba(82, 107, 254, 0.15);
    transform: translateY(-0.125rem);
}

.digiblocks-block-card-header {
    display: flex;
    align-items: flex-start;
    padding: 1.25rem;
}

.digiblocks-block-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    background-color: rgba(82, 107, 254, 0.1);
    margin-right: 1rem;
    overflow: hidden;
}

.digiblocks-block-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: #526bfe;
}

.digiblocks-block-info {
    flex: 1;
    padding-right: 1rem;
}

.digiblocks-block-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.digiblocks-block-info p {
    margin: 0;
    color: #646970;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Toggle Switch */
.digiblocks-toggle {
    position: relative;
    display: inline-block;
    width: 3rem;
    height: 1.5rem;
}

.digiblocks-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.digiblocks-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 2.125rem;
    transition: 0.4s;
}

.digiblocks-toggle-slider:before {
    position: absolute;
    content: "";
    height: 1.25rem;
    width: 1.25rem;
    left: 0.125rem;
    bottom: 0.125rem;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
}

.digiblocks-toggle input:checked + .digiblocks-toggle-slider {
    background-color: #526bfe;
}

.digiblocks-toggle input:focus + .digiblocks-toggle-slider {
    box-shadow: 0 0 0.125rem #526bfe;
}

.digiblocks-toggle input:checked + .digiblocks-toggle-slider:before {
    transform: translateX(1.5rem);
}

/* Toggle switch on settings tab */
.digiblocks-toggle-field {
    display: flex;
    gap: 1rem;
    align-items: center;

    .digiblocks-form-field label {
        margin: 0;
    }

    .digiblocks-toggle-caption {
        flex: 1;
    }
}

/* Admin Actions */
.digiblocks-admin-actions,
.digiblocks-form-actions {
    display: flex;
    align-items: center;
    padding: 1.125rem 1.75rem;
    border-top: 0.0625rem solid #f0f0f0;
    background-color: #f9f9f9;
}

.digiblocks-admin-actions .button-primary,
.digiblocks-form-actions .button-primary,
.button-primary {
    background-color: #526bfe;
    border-color: #526bfe;
    color: #fff;
    box-shadow: 0 0.1875rem 0.3125rem rgba(82, 107, 254, 0.2);
    padding: 0.375rem 1.125rem;
    height: auto;
    font-weight: 500;
    transition: all 0.2s ease;

    &:hover,
    &:focus {
        background-color: #394bb6;
        border-color: #394bb6;
        transform: translateY(-0.0625rem);
        box-shadow: 0 0.25rem 0.5rem rgba(82, 107, 254, 0.3);
    }
}

.digiblocks-save-status {
    margin-left: 1rem;
    font-size: 0.875rem;
    color: #646970;
    transition: opacity 0.3s ease;
}

/* Status Indicators */
.digiblocks-saving,
.digiblocks-saved,
.digiblocks-error {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideUp 0.3s ease-out;
}

.digiblocks-saving {
    background-color: #fef3c7;
    color: #92400e;
}

.digiblocks-saving::before {
    content: "";
    width: 12px;
    height: 12px;
    border: 2px solid #92400e;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: digiblocks-spin 1s linear infinite;
}

.digiblocks-saved {
    background-color: #d1fae5;
    color: #065f46;
}

.digiblocks-saved::before {
    content: "✓";
    font-weight: bold;
}

.digiblocks-error {
    background-color: #fee2e2;
    color: #991b1b;
}

.digiblocks-error::before {
    content: "⚠";
    font-weight: bold;
}

/* Settings Form */
.digiblocks-settings-form {
    margin: 0;
}

.digiblocks-form-wrapper {
    padding: 1.75rem;
}

.digiblocks-form-section {
    margin-bottom: 2.25rem;
    padding-bottom: 1.75rem;
    border-bottom: 0.0625rem solid #f0f0f0;
}

.digiblocks-form-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.digiblocks-form-section h3 {
    margin: 0 0 1.125rem;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    padding-bottom: 0.375rem;
    border-bottom: 0.125rem solid rgba(82, 107, 254, 0.1);
    display: inline-block;
}

.digiblocks-form-section-description {
    margin: 0 0 1.25rem;
    font-size: 0.875rem;
    color: #646970;
    line-height: 1.5;
}

.digiblocks-form-row {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.digiblocks-form-flex {
    display: flex;
    gap: 1.5rem;

    .digiblocks-form-field {
        margin: 0;
        flex: 1;
    }
}

.digiblocks-form-field {
    margin-bottom: 1.5rem;
}

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

.digiblocks-form-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
}

.digiblocks-form-description {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    font-weight: normal;
    color: #646970;
}

.digiblocks-form-field input[type="text"],
.digiblocks-form-field input[type="url"],
.digiblocks-form-field input[type="number"],
.digiblocks-form-field input[type="password"],
.digiblocks-form-field select,
.digiblocks-form-field textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border: 0.0625rem solid #e2e4e7;
    border-radius: 0.375rem;
    background-color: #fff;
    box-shadow: inset 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.07);
    transition: all 0.2s ease;
}

.digiblocks-form-field input:focus,
.digiblocks-form-field select:focus,
.digiblocks-form-field textarea:focus {
    border-color: #526bfe;
    box-shadow: 0 0 0 0.0625rem #526bfe;
    outline: none;
}

.digiblocks-input-group {
    display: flex;
    align-items: stretch;
}

.digiblocks-form-field .digiblocks-input-group input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    margin: 0;
}

.digiblocks-form-field .digiblocks-content-width input[type="number"] {
    padding: 0.25rem 0.8rem;
}

.digiblocks-content-width {
    max-width: 200px;
}

.digiblocks-input-suffix {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.875rem;
    font-size: 0.875rem;
    background-color: #f0f0f1;
    border: 0.0625rem solid #e2e4e7;
    border-left: none;
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.digiblocks-form-field .button-secondary,
.button-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f8f8;
    border-color: #e2e4e7;
    border-left: 0;
    color: #555;
    height: auto;
    margin: 0;
    transition: all 0.2s ease;
}

.digiblocks-form-field .button-secondary:hover,
.button-secondary:hover {
    background-color: #f2f2f2;
    border-color: #d0d0d0;
}

.digiblocks-toggle-password {
    padding: 0 !important;
    width: 2.5rem;
    height: 2.5rem;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.digiblocks-toggle-password .dashicons {
    font-size: 1.125rem;
    width: 1.125rem;
    height: 1.125rem;
    line-height: 1;
}

.digiblocks-form-field input[type="checkbox"] {
    margin-right: 0.5rem;
    border: 0.0625rem solid #e2e4e7;
    border-radius: 0.1875rem;
    width: 1rem;
    height: 1rem;
}

.digiblocks-form-field input[type="checkbox"]:checked {
    background-color: #526bfe;
    border-color: #526bfe;
}

/* Getting Started */
.digiblocks-getting-started {
    padding: 1.75rem;
}

.digiblocks-step {
    display: flex;
    gap: 1.125rem;
    margin-bottom: 1.75rem;
    transition: all 0.2s ease;
    padding: 1rem;
    border-radius: 0.625rem;
}

.digiblocks-step:hover {
    background-color: rgba(82, 107, 254, 0.03);
    transform: translateX(0.3125rem);
}

.digiblocks-step:last-child {
    margin-bottom: 0;
}

.digiblocks-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #fff;
    background-color: #526bfe;
    border-radius: 0.625rem;
    box-shadow: 0 0.1875rem 0.375rem rgba(82, 107, 254, 0.25);
}

.digiblocks-step-content {
    flex: 1;

    h3 {
        margin: 0 0 0.5rem;
        font-size: 1rem;
        font-weight: 600;
        color: #333;
    }
}

.digiblocks-step-content p {
    margin: 0;
    font-size: 0.875rem;
    color: #646970;
    line-height: 1.5;
}

/* Promo Section Styles */
.digiblocks-promo-container {
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
}

.digiblocks-promo-product {
    display: flex;
    flex-direction: column;
    gap: 1rem;

    &:not(:last-child) {
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
        border-bottom: 1px solid #f0f0f0;
    }
}

.digiblocks-promo-logo {
    display: flex;

    a {
        display: flex;
    }
}

.digiblocks-promo-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;

    p {
        color: #555;
        line-height: 1.6;
        margin: 0;
    }
}

.digiblocks-features {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;

    li {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: #475569;
        font-size: 0.8125rem;
        line-height: 1.5;
        margin: 0;

        svg {
            display: flex;
            width: 10px;
            height: auto;
            fill: #10b981;
        }

        span {
            flex: 1;
        }
    }
}

.digiblocks-link-wrapper {
    display: inline-flex;

    .digiblocks-button {
        display: flex;
        align-items: center;
        gap: 0.25rem;
        background-color: #526bfe;
        color: #fff;
        border-color: #526bfe;
        line-height: 1;
        font-weight: 500;
        box-shadow: none;
        outline: none;
        padding: 0.7rem 1rem;
        border-radius: 30px;
        text-decoration: none;
        text-shadow: none;
        transition: all 0.3s ease;

        &[disabled] {
            background-color: #526bfe !important;
            border-color: #526bfe !important;
            color: #fff !important;
        }

        &:hover,
        &:focus {
            background-color: #394bb6;
            border-color: #394bb6;
            color: #fff;
            transform: translateX(0.125rem);
            box-shadow: none;
            outline: none;
        }

        &:hover svg {
            transform: translateX(0.125rem);
        }

        span {
            flex: 1;
        }

        svg {
            transition: all 0.3s ease;
            fill: currentColor;
        }
    }
}

.digiblocks-link {
    color: #526bfe;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transform: all 0.3s ease;

    span {
        flex: 1;
    }

    svg {
        transform: all 0.3s ease;
        fill: currentColor;
    }

    &:hover {
        color: #394bb6;
    }
}

.digiblocks-coming-soon {
    opacity: 0.6;

    .digiblocks-promo-logo {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
}

.digiblocks-coming-soon-badge {
    background: #526bfe;
    color: white;
    padding: 0.25rem 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 2rem;
}

/* Resources Section Styles */
.digiblocks-resources-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.75rem;
}

.digiblocks-resource-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.digiblocks-resource-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.digiblocks-resource-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;

    h3 {
        flex: 1;
        margin: 0;
        font-size: 1rem;
        font-weight: 600;
        color: #333;
    }
}

.digiblocks-resource-icon {
    background: rgba(82, 107, 254, 0.1);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.digiblocks-resource-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    p {
        color: #666;
        font-size: 0.875rem;
        margin: 0;
        flex: 1;
    }
}

/* Regeneration assets */
.digiblocks-regenerate-section {
    display: flex;
    align-items: center;
}

/* Info Section */
.digiblocks-regenerate-info {
    padding: 1.5rem 1.75rem;
    flex: 1;

    h4 {
        margin: 0 0 1rem 0;
        font-size: 1rem;
        font-weight: 600;
        color: #333;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    ul {
        margin: 0;
        padding: 0;
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    li {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin: 0;
        color: #555;
        font-size: 0.875rem;
        line-height: 1.5;

        .check-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2rem;
            height: 2rem;
            background-color: rgba(82, 107, 254, 0.1);
            border-radius: 50%;

            svg {
                width: 1.125rem;
                height: 1.125rem;
                fill: #526bfe;
            }
        }

        .text {
            flex: 1;
        }
    }
}

/* Action Section */
.digiblocks-regenerate-action {
    padding: 2rem 1.75rem;
    text-align: center;
    position: relative;
    flex: 1;
}

/* Regenerate Button */
#digiblocks-regenerate-assets {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
    justify-content: center;
    background-color: #526bfe;
    border-color: #526bfe;
    color: #fff;
    font-size: 0.9375rem;
    box-shadow: 0 0.1875rem 0.3125rem rgba(82, 107, 254, 0.2);
    padding: 0.875rem 2rem;
    font-weight: 500;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;

    &:hover,
    &:focus {
        background-color: #394bb6;
        border-color: #394bb6;
        transform: translateY(-0.125rem);
        box-shadow: 0 0.25rem 0.5rem rgba(82, 107, 254, 0.3);
    }

    .rotate-icon {
        width: 1.125rem;
        height: 1.125rem;
        fill: #fff;
        animation: none;
        transition: all 0.3s ease;
    }
}

#digiblocks-regenerate-assets:active {
    transform: translateY(0);
}

#digiblocks-regenerate-assets:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 0.125rem 0.375rem rgba(149, 165, 166, 0.2);
}

#digiblocks-regenerate-assets:disabled .rotate-icon {
    fill: #687475;
    animation: digiblocks-spin 1s linear infinite;
}

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

/* Progress Section */
.digiblocks-regenerate-progress {
    margin-top: 1.5rem;
    max-width: 25rem;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(0.625rem);
    transition: all 0.4s ease;
}

.digiblocks-regenerate-progress[style*="block"] {
    opacity: 1;
    transform: translateY(0);
}

.digiblocks-progress-bar {
    width: 100%;
    height: 0.5rem;
    background: #f0f0f1;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.1);
    margin-bottom: 0.75rem;
}

.digiblocks-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #526bfe 0%, #394bb6 50%, #526bfe 100%);
    background-size: 200% 100%;
    border-radius: 1rem;
    width: 0%;
    transition: width 0.3s ease;
    animation: digiblocks-progress-gradient 2s ease-in-out infinite;
    position: relative;

    &::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent
        );
        animation: digiblocks-progress-shine 1.5s ease-in-out infinite;
        border-radius: 1rem;
    }
}

@keyframes digiblocks-progress-gradient {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes digiblocks-progress-shine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.digiblocks-progress-text {
    font-size: 0.875rem;
    color: #646970;
    font-weight: 500;
    text-align: center;
}

/* Result Section */
.digiblocks-regenerate-result {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
    border-width: 0.0625rem;
    border-style: solid;
    opacity: 0;
    transform: translateY(0.625rem);
    transition: all 0.4s ease;
    display: none;
}

.digiblocks-regenerate-result.active {
    opacity: 1;
    transform: translateY(0);
    display: flex;
    flex-direction: column;
}

.digiblocks-regenerate-result.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #10b981;
    color: #065f46;
    position: relative;
}

.digiblocks-regenerate-result.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #ef4444;
    color: #7f1d1d;
    position: relative;
}

.digiblocks-regenerate-result small {
    display: block;
    margin-top: 0.75rem;
    font-weight: 400;
    font-size: 0.8125rem;
    opacity: 0.9;
    line-height: 1.6;
    padding-top: 0.75rem;
    border-top: 0.0625rem solid rgba(0, 0, 0, 0.1);
}

/* Animation for result appearance */
@keyframes digiblocks-slide-in {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.digiblocks-regenerate-result {
    animation: digiblocks-slide-in 0.4s ease-out;
}

/* Responsive Design */
@media (max-width: 782px) {
}

@media (max-width: 570px) {
    .digiblocks-progress-bar {
        height: 0.375rem;
    }

    .digiblocks-regenerate-result {
        font-size: 0.875rem;
        padding: 0.875rem 1rem;
    }

    .digiblocks-regenerate-result small {
        font-size: 0.75rem;
    }
}

/* Loading state enhancement */
.digiblocks-regenerate-section.is-loading {
    pointer-events: none;
}

.digiblocks-regenerate-section.is-loading .digiblocks-regenerate-info {
    opacity: 0.7;
}

/* Custom Confirmation Modal */
.digiblocks-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(0.1875rem);
}

.digiblocks-modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.digiblocks-modal {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.2);
    max-width: 28rem;
    width: 90%;
    margin: 1rem;
    transform: scale(0.8) translateY(2rem);
    transition: all 0.3s ease;
    overflow: hidden;
}

.digiblocks-modal-overlay.is-visible .digiblocks-modal {
    transform: scale(1) translateY(0);
}

.digiblocks-modal-header {
    padding: 1.5rem 1.75rem 1rem;
    border-bottom: 0.0625rem solid #f0f0f0;
    background: linear-gradient(
        135deg,
        rgba(82, 107, 254, 0.05) 0%,
        rgba(82, 107, 254, 0.01) 100%
    );
}

.digiblocks-modal-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.digiblocks-modal-title::before {
    content: "\f534";
    font-family: dashicons;
    font-size: 1.25rem;
    color: #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 50%;
    font-size: 1rem;
}

.digiblocks-modal-body {
    padding: 1.5rem 1.75rem;
}

.digiblocks-modal-message {
    margin: 0;
    color: #555;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.digiblocks-modal-actions {
    padding: 1rem 1.75rem 1.5rem;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    background: #f9f9f9;
}

.digiblocks-modal-button {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 0.0625rem solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 6rem;
    justify-content: center;
}

.digiblocks-modal-button:focus {
    outline: 0.125rem solid #526bfe;
    outline-offset: 0.125rem;
}

.digiblocks-modal-button:focus:not(:focus-visible) {
    outline: none;
}

.digiblocks-modal-button.is-secondary {
    background: #fff;
    color: #555;
    border-color: #e2e4e7;
}

.digiblocks-modal-button.is-secondary:hover {
    background: #f8f8f8;
    border-color: #d0d0d0;
    color: #333;
}

.digiblocks-modal-button.is-primary {
    background-color: #526bfe;
    color: #fff;
    border-color: #526bfe;
    box-shadow: 0 0.125rem 0.375rem rgba(82, 107, 254, 0.25);
}

.digiblocks-modal-button.is-primary:hover {
    background-color: #394bb6;
    border-color: #394bb6;
    transform: translateY(-0.0625rem);
}

.digiblocks-modal-button.is-primary:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1080px) {
    .digiblocks-admin-content {
        flex-direction: column;
    }

    .digiblocks-admin-second {
        max-width: 100%;
    }
}

@media (max-width: 782px) {
    .digiblocks-blocks-grid {
        grid-template-columns: 1fr;
    }

    .digiblocks-admin-header {
        flex-wrap: wrap;
    }

    .digiblocks-admin-tabs {
        margin-top: 0.9375rem;
        width: 100%;
    }

    .digiblocks-admin-tabs a {
        flex: 1;
        justify-content: center;
    }

    .digiblocks-regenerate-section {
        flex-direction: column;
    }

    .digiblocks-regenerate-action {
        text-align: left;
        width: 100%;
    }

    .digiblocks-regenerate-info {
        width: 100%;
    }
}

@media (max-width: 570px) {
    .digiblocks-form-flex {
        flex-direction: column;
    }

    .digiblocks-toggle-field {
        align-items: flex-start;
    }
}
