.blm-settings-wrap {
    max-width: 900px;
}

/* Instructions Panel */
.blm-instructions-panel {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    margin-bottom: 20px;
}

.blm-instructions-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: #f6f7f7;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    text-align: left;
}

.blm-instructions-toggle:hover {
    background: #f0f0f1;
}

.blm-instructions-toggle .dashicons {
    color: #2271b1;
}

.blm-instructions-toggle .blm-toggle-icon {
    margin-left: auto;
    transition: transform 0.2s;
}

.blm-instructions-toggle.active .blm-toggle-icon {
    transform: rotate(180deg);
}

.blm-instructions-content {
    padding: 20px 24px;
    border-top: 1px solid #c3c4c7;
}

.blm-instructions-content h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #1d2327;
}

.blm-instructions-content h3:not(:first-child) {
    margin-top: 20px;
}

.blm-instructions-content h4 {
    margin: 16px 0 8px 0;
    font-size: 13px;
    color: #50575e;
}

.blm-instructions-content p {
    margin: 0 0 10px 0;
    color: #50575e;
}

.blm-instructions-content code {
    background: #f0f0f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.blm-instructions-content ul {
    margin: 8px 0 0 20px;
}

.blm-instructions-content li {
    margin-bottom: 4px;
    color: #50575e;
}

/* Shortcode table */
.blm-shortcode-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 13px;
}

.blm-shortcode-table th,
.blm-shortcode-table td {
    padding: 8px 12px;
    text-align: left;
    border: 1px solid #ddd;
}

.blm-shortcode-table th {
    background: #f6f7f7;
    font-weight: 600;
    color: #1d2327;
}

.blm-shortcode-table td {
    background: #fff;
    color: #50575e;
}

.blm-shortcode-table code {
    background: #f0f0f1;
    padding: 1px 4px;
    font-size: 12px;
}

/* Code examples */
.blm-code-examples {
    background: #f6f7f7;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
}

.blm-code-examples p {
    margin: 0 0 4px 0;
    font-size: 12px;
}

.blm-code-examples p:not(:first-child) {
    margin-top: 12px;
}

.blm-code-examples code {
    display: block;
    background: #1d2327;
    color: #50c878;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 12px;
}

/* Connection Banner */
.blm-connection-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 4px;
    border: 1px solid #c3c4c7;
    background: #f6f7f7;
}

.blm-connection-banner.blm-connected {
    background: #edfaef;
    border-color: #46b450;
}

.blm-connection-banner.blm-disconnected {
    background: #f6f7f7;
    border-color: #c3c4c7;
}

.blm-status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.blm-connected .blm-status-indicator {
    background: #46b450;
}

.blm-disconnected .blm-status-indicator {
    background: #999;
}

.blm-last-updated {
    color: #666;
    font-style: italic;
    margin-left: auto;
    margin-right: 10px;
}

.blm-api-key-input {
    width: 280px;
    margin-right: 6px;
}

.blm-disconnect-btn {
    color: #a00 !important;
    border-color: #a00 !important;
}

.blm-disconnect-btn:hover {
    background: #a00 !important;
    color: #fff !important;
}

/* Sections */
.blm-section {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.blm-section h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 1.2em;
}

.blm-section h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1em;
    color: #1d2327;
}

/* Field Grid (Address) */
.blm-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}

.blm-field-grid .blm-field-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 13px;
}

.blm-field-grid .blm-field-group input {
    width: 100%;
}

/* Hours of Operation */
.blm-hours-toggle {
    margin-bottom: 14px;
}

.blm-hours-toggle label {
    font-weight: 600;
    font-size: 13px;
}

.blm-hours-table {
    border: 1px solid #ddd;
    border-radius: 3px;
    overflow: hidden;
}

.blm-hours-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

.blm-hours-row:last-child {
    border-bottom: none;
}

.blm-hours-row:nth-child(even) {
    background: #f9f9f9;
}

.blm-day-label {
    width: 100px;
    font-weight: 600;
    font-size: 13px;
}

.blm-day-toggle {
    width: 60px;
    font-size: 13px;
}

.blm-time-fields {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blm-time-fields input[type="time"] {
    width: 130px;
}

.blm-time-sep {
    color: #666;
    font-size: 13px;
}

/* Disabled state */
.blm-settings-wrap input[disabled],
.blm-settings-wrap select[disabled],
.blm-settings-wrap textarea[disabled] {
    background: #f0f0f1 !important;
    color: #8c8f94 !important;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Schema Preview */
.blm-toggle-preview {
    background: none;
    border: none;
    cursor: pointer;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.blm-toggle-preview:hover {
    color: #2271b1;
}

.blm-schema-preview {
    background: #1d2327;
    color: #50c878;
    padding: 16px;
    border-radius: 4px;
    overflow-x: auto;
    margin-top: 10px;
}

.blm-schema-preview pre {
    margin: 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: inherit;
}

/* Logo preview */
.blm-logo-preview {
    margin-top: 6px;
}

.blm-logo-preview img {
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 2px;
    background: #fff;
}

/* Tooltips */
.blm-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    background: #2271b1;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    cursor: help;
    vertical-align: middle;
    text-decoration: none;
}

.blm-tooltip:hover {
    background: #135e96;
}

.blm-tooltip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 50%;
    left: calc(100% + 10px);
    transform: translateY(50%);
    background: #1d2327;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: normal;
    white-space: normal;
    width: 280px;
    max-width: 280px;
    line-height: 1.4;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    pointer-events: none;
    text-align: left;
}

.blm-tooltip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: calc(100% + 4px);
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #1d2327;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
}

.blm-tooltip:hover::after,
.blm-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Tooltip in table header alignment */
th .blm-tooltip {
    vertical-align: text-bottom;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .blm-field-grid {
        grid-template-columns: 1fr;
    }

    .blm-connection-banner {
        flex-wrap: wrap;
    }

    .blm-last-updated {
        margin-left: 0;
        width: 100%;
    }

    .blm-hours-row {
        flex-wrap: wrap;
    }

    .blm-day-label {
        width: 100%;
    }

    .blm-api-key-input {
        width: 100%;
        margin-bottom: 6px;
    }
}
