/**
 * DILA Gutenberg Sidebar Styles
 */

.dila-loading {
    text-align: center;
    padding: 20px;

    .components-spinner {
        float: none;
        margin: 0 auto 10px;
    }

    p {
        margin: 0;
        color: #757575;
        font-size: 13px;
    }
}

.dila-suggestions-list {
    margin: 0 0 15px;
}

.dila-suggestion-card {
    padding: 12px;
    border: 1px solid #ddd;
    margin-bottom: 12px;
    border-radius: 4px;
    background: #f9f9f9;
    transition: all 0.2s ease;
    position: relative;

    &:hover {
        border-color: #2271b1;
        background: #fff;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    &.dila-suggestion-used {
        opacity: 0.6;
        background: #f0f0f0;

        &:hover {
            border-color: #ddd;
            background: #f0f0f0;
            box-shadow: none;
        }
    }

    h4 {
        margin: 0 0 10px 0;
        font-size: 13px;
        font-weight: 600;
        line-height: 1.4;
        color: #1e1e1e;
    }
}

.dila-anchor-buttons {
    margin-bottom: 8px;

    .components-button {
        margin: 0 6px 6px 0;
        font-size: 11px;
        padding: 4px 8px;
        height: auto;
        line-height: 1.4;

        &.is-primary {
            background: #2271b1;
            border-color: #2271b1;

            &:hover:not(:disabled) {
                background: #135e96;
                border-color: #135e96;
            }
        }

        &.is-secondary {
            &:hover:not(:disabled) {
                border-color: #2271b1;
                color: #2271b1;
            }
        }

        &:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
    }
}

.dila-relevance {
    font-size: 11px;
    color: #757575;
    margin-top: 4px;
}

.dila-used-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #00a32a;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
}

.dila-actions {
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid #ddd;

    .components-button {
        width: 100%;
    }
}

// Panel body adjustments
.edit-post-sidebar .components-panel__body-toggle {
    &.dila-panel-toggle {
        font-weight: 600;
    }
}

// Notice overrides
.components-notice {
    margin: 0 0 15px;
    padding: 10px;

    .components-notice__content {
        margin: 0;
        font-size: 13px;
    }
}
