/* ============================================
   LOCAL BUSINESS SCHEMA - MODERN ADMIN STYLES
   ============================================ */

.lbs-wrap {
    max-width: 1000px;
    margin: 20px 0 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.lbs-wrap h1 {
    margin: 0 0 8px;
    padding: 30px 30px 0;
    color: #1d2327;
    font-size: 23px;
    font-weight: 600;
    line-height: 1.3;
}

.lbs-description {
    padding: 0 30px 30px;
    margin: 0;
    font-size: 16px;
    color: #646970;
    border-bottom: 1px solid #dcdcde;
}

/* Form Styling */
#lbs-form {
    padding: 30px;
}

.form-table {
    border-collapse: collapse;
    margin-top: 0;
}

.form-table th {
    width: 220px;
    padding: 20px 10px 20px 0;
    font-weight: 600;
    color: #1d2327;
    vertical-align: top;
    text-align: left;
}

.form-table td {
    padding: 15px 10px;
    vertical-align: middle;
}

.form-table tr {
    border-bottom: 1px solid #f0f0f1;
}

.form-table tr:last-child {
    border-bottom: none;
}

/* Toggle Switch - Modern */
.lbs-toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 2px;
}

.lbs-toggle input {
    display: none;
}

.lbs-toggle-slider {
    width: 52px;
    height: 28px;
    background-color: #c3c4c7;
    border-radius: 34px;
    position: relative;
    margin-right: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lbs-toggle-slider:before {
    content: "";
    height: 22px;
    width: 22px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    left: 3px;
    top: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.lbs-toggle input:checked + .lbs-toggle-slider {
    background-color: #2271b1;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.lbs-toggle input:checked + .lbs-toggle-slider:before {
    transform: translateX(24px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.lbs-toggle-label {
    font-weight: 500;
    color: #3c434a;
    font-size: 14px;
    min-width: 70px;
}

.lbs-toggle:hover .lbs-toggle-slider {
    background-color: #a7aaad;
}

.lbs-toggle input:checked:hover + .lbs-toggle-slider {
    background-color: #135e96;
}

/* Input Fields */
.regular-text {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: #2c3338;
    background-color: #fff;
    transition: all 0.2s ease;
}

.regular-text:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
    outline: 2px solid transparent;
}

.regular-text::placeholder {
    color: #8c8f94;
}

/* Select Dropdown */
select {
    width: 100%;
    max-width: 400px;
    padding: 8px 30px 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: #2c3338;
    background-color: #fff;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M5 8l5 5 5-5z" fill="%238c8f94"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    appearance: none;
    cursor: pointer;
}

select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
    outline: 2px solid transparent;
}

/* Upload Button */
.lbs-upload-button {
    margin-left: 10px;
    padding: 8px 16px;
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    color: #2c3338;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.lbs-upload-button:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
    color: #1d2327;
}

.lbs-upload-button:active {
    background: #e0e0e0;
}

/* Description Text */
.description {
    font-size: 13px;
    color: #646970;
    margin-top: 8px;
    line-height: 1.5;
}

/* Schema Preview - Modern Card */
.lbs-preview {
    margin: 40px 30px 30px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.lbs-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(to bottom, #f6f7f7, #f0f0f1);
    border-bottom: 1px solid #dcdcde;
}

.lbs-preview-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lbs-preview-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.lbs-validation-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.lbs-valid {
    background: linear-gradient(to bottom, #edf7ed, #e0f0e0);
    color: #0c5b0c;
    border: 1px solid #a7d7a9;
}

.lbs-invalid {
    background: linear-gradient(to bottom, #fdeded, #f8e0e0);
    color: #a32121;
    border: 1px solid #f5c2c7;
}

.lbs-refresh-preview {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #c3c4c7;
    color: #50575e;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.lbs-refresh-preview:hover:not(:disabled) {
    background: #f6f7f7;
    border-color: #8c8f94;
    color: #1d2327;
}

.lbs-refresh-preview:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.lbs-copy-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(to bottom, #2271b1, #1a5f8a);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.lbs-copy-button:hover {
    background: linear-gradient(to bottom, #135e96, #0e4a75);
    transform: translateY(-1px);
}

.lbs-copy-button:active {
    transform: translateY(0);
}

.lbs-copy-button.copied {
    background: linear-gradient(to bottom, #4caf50, #3d8b40);
}

/* Preview Box */
.lbs-preview-box {
    padding: 24px;
}

#lbs-json-preview {
    margin: 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e2e4e7;
    border-radius: 6px;
    font-family: 'Menlo', 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #2c3338;
}

/* Syntax Highlighting */
#lbs-json-preview .json-key {
    color: #9c27b0;
    font-weight: 600;
}

#lbs-json-preview .json-string {
    color: #4caf50;
}

#lbs-json-preview .json-number {
    color: #2196f3;
}

#lbs-json-preview .json-boolean {
    color: #ff9800;
}

#lbs-json-preview .json-null {
    color: #f44336;
}

#lbs-json-preview .json-colon {
    color: #757575;
}

#lbs-json-preview .loading {
    color: #646970;
    font-style: italic;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Validation Details */
.lbs-validation-details {
    margin-top: 16px;
    padding: 14px 16px;
    background: #f8f9fa;
    border: 1px solid #e2e4e7;
    border-radius: 6px;
    font-size: 13px;
    color: #50575e;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.lbs-validation-details .dashicons {
    color: #646970;
    margin-top: 1px;
    flex-shrink: 0;
}

/* Preview Actions */
.lbs-preview-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f1;
}

.lbs-test-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: #fff;
    border: 1px solid #dcdcde;
    color: #50575e;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.lbs-test-button:hover {
    background: #f6f7f7;
    border-color: #8c8f94;
    color: #1d2327;
    text-decoration: none;
}

.lbs-test-button .dashicons {
    font-size: 16px;
}

/* Submit Button */
.submit {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f1;
}

.submit .button-primary {
    padding: 10px 20px;
    background: linear-gradient(to bottom, #2271b1, #1a5f8a);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    height: auto;
    line-height: 1.5;
    transition: all 0.2s ease;
}

.submit .button-primary:hover {
    background: linear-gradient(to bottom, #135e96, #0e4a75);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

.submit .button-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(34, 113, 177, 0.2);
}

/* Responsive Design */
@media screen and (max-width: 782px) {
    .lbs-wrap {
        margin: 10px;
        border-radius: 6px;
    }
    
    .lbs-wrap h1,
    .lbs-description,
    #lbs-form,
    .lbs-preview {
        padding: 20px;
    }
    
    .form-table th,
    .form-table td {
        display: block;
        width: 100%;
        padding: 15px 0;
    }
    
    .form-table th {
        padding-bottom: 8px;
    }
    
    .lbs-preview-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .lbs-preview-controls {
        justify-content: space-between;
    }
    
    .lbs-preview-actions {
        flex-direction: column;
    }
    
    .lbs-test-button {
        justify-content: center;
    }
}

/* Animation for refresh icon */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.dashicons.spin {
    animation: spin 1s linear infinite;
}

/* Field Group Highlight */
tr:hover {
    background-color: #fbfbfb;
}

/* Focus States for Accessibility */
.regular-text:focus-visible,
select:focus-visible,
.lbs-upload-button:focus-visible,
.lbs-refresh-preview:focus-visible,
.lbs-copy-button:focus-visible,
.lbs-test-button:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}










/* Field Tips Styling */
.lbs-field-tips {
    margin-top: 8px;
    padding: 10px 12px;
    background: #f0f7ff;
    border: 1px solid #c5d9f1;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.5;
    color: #1e3a5c;
}

.lbs-field-tips small {
    font-size: 12px;
    line-height: 1.5;
}

.lbs-field-tips strong {
    color: #1d4ed8;
}

/* Hover effect for tips */
.lbs-field-tips:hover {
    background: #e8f2ff;
    border-color: #a3c7f5;
}

/* Specific styling for toggle tips */
.lbs-toggle + .lbs-field-tips {
    margin-left: 62px; /* Align with toggle switch */
    max-width: 400px;
}

/* Responsive tips */
@media screen and (max-width: 782px) {
    .lbs-toggle + .lbs-field-tips {
        margin-left: 0;
        margin-top: 10px;
    }
}