/* Gutenberg Anchor Blocks Styles */

.gab-element-selector {
    margin-bottom: 16px;
}

.gab-element-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1e1e1e;
}

.gab-element-selector select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    line-height: 1.4;
}

.gab-element-selector select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.gab-anchor-settings {
    border-top: 1px solid #ddd;
    padding-top: 16px;
    margin-top: 16px;
}

.gab-target-selector {
    margin-top: 16px;
}

.gab-target-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1e1e1e;
}

.gab-target-selector select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    line-height: 1.4;
}

.gab-target-selector select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

/* Style for blocks that are anchors */
.block-editor-block-list__block[data-tagname="a"] {
    position: relative;
}

.block-editor-block-list__block[data-tagname="a"]::before {
    content: "🔗";
    position: absolute;
    top: -20px;
    left: 0;
    font-size: 12px;
    background: #007cba;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 10;
}

/* Hover effect for anchor blocks */
.block-editor-block-list__block[data-tagname="a"]:hover {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* URL validation styles */
.gab-url-error {
    color: #d63638;
    font-size: 12px;
    margin-top: 4px;
}

.gab-url-success {
    color: #00a32a;
    font-size: 12px;
    margin-top: 4px;
}

/* Responsive adjustments */
@media (max-width: 782px) {
    .gab-element-selector select,
    .gab-target-selector select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Anchor link block class */
.wp-block-anchor-link {
    display: block !important;
    text-decoration: none !important;
    color: inherit !important;
}

/* More specific selectors for better CSS specificity */
.block-editor-block-list__block.wp-block-anchor-link,
.wp-block.wp-block-anchor-link,
a.wp-block-anchor-link {
    display: block !important;
    text-decoration: none !important;
    color: inherit !important;
}
