/**
 * Hyperion Schema - Admin Styles
 *
 * Provides a polished, product-grade admin interface with
 * tabbed navigation, hours builder grid, FAQ builder,
 * and JSON-LD preview panel.
 */

/* =============================================
   Layout & Page Wrapper
   ============================================= */

.hypsc-wrap {
    max-width: 900px;
}

.hypsc-wrap h1 {
    margin-bottom: 10px;
}

/* =============================================
   Tabbed Navigation
   ============================================= */

.hypsc-tabs {
    margin-bottom: 20px;
    border-bottom: 1px solid #c3c4c7;
}

.hypsc-tabs .nav-tab {
    font-size: 13px;
    padding: 6px 14px;
    margin-bottom: -1px;
}

.hypsc-tabs .nav-tab-active {
    background: #fff;
    border-bottom: 1px solid #fff;
}


/* =============================================
   Form Styles
   ============================================= */

.hypsc-form .form-table th {
    width: 180px;
    padding-top: 16px;
}

.hypsc-form .form-table td {
    padding-top: 12px;
    padding-bottom: 12px;
}

.hypsc-form .regular-text {
    width: 400px;
    max-width: 100%;
}

/* Image picker */
.hypsc-image-picker {
    display: flex;
    gap: 6px;
    align-items: center;
}

.hypsc-image-picker .regular-text {
    flex: 1;
}

.hypsc-image-preview {
    margin-top: 8px;
}

.hypsc-image-preview img {
    max-width: 200px;
    max-height: 120px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    display: block;
}

.hypsc-form .large-text {
    width: 100%;
    max-width: 600px;
}

.hypsc-form .small-text {
    width: 120px;
}

.hypsc-form select {
    min-width: 300px;
}

.hypsc-form .description {
    color: #646970;
    font-style: italic;
    margin-top: 4px;
}

/* =============================================
   Hours Builder
   ============================================= */

.hypsc-hours-builder {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 0;
    max-width: 600px;
}

.hypsc-hours-header {
    display: grid;
    grid-template-columns: 120px 1fr 1fr 100px;
    gap: 10px;
    padding: 10px 16px;
    background: #f0f0f1;
    border-bottom: 1px solid #c3c4c7;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #50575e;
}

.hypsc-hours-row {
    display: grid;
    grid-template-columns: 120px 1fr 1fr 100px;
    gap: 10px;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid #f0f0f1;
}

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

.hypsc-hours-col-day {
    font-weight: 500;
}

.hypsc-time-input {
    padding: 4px 8px;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    font-size: 13px;
    width: 100%;
    max-width: 130px;
}

.hypsc-hours-col-closed {
    font-size: 12px;
    color: #646970;
}

.hypsc-hours-col-closed input[type="checkbox"] {
    margin-right: 4px;
}

/* =============================================
   FAQ Builder
   ============================================= */

.hypsc-faq-builder {
    max-width: 700px;
}

.hypsc-faq-row {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 12px;
    position: relative;
}

.hypsc-faq-row-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.hypsc-faq-drag {
    cursor: grab;
    color: #c3c4c7;
    margin-right: 8px;
    font-size: 16px;
}

.hypsc-faq-drag:hover {
    color: #50575e;
}

.hypsc-faq-label {
    font-weight: 600;
    font-size: 13px;
    flex: 1;
}

.hypsc-remove-faq {
    color: #b32d2e !important;
    text-decoration: none !important;
    padding: 2px;
}

.hypsc-remove-faq:hover {
    color: #a00 !important;
}

.hypsc-remove-faq .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.hypsc-faq-question {
    margin-bottom: 8px !important;
    font-weight: 500;
}

.hypsc-faq-answer {
    resize: vertical;
}

.hypsc-add-faq {
    margin-top: 4px;
}

.hypsc-add-faq .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    vertical-align: text-bottom;
    margin-right: 2px;
}

/* =============================================
   Preview Panel
   ============================================= */

.hypsc-preview-panel {
    margin-top: 10px;
}

.hypsc-preview-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.hypsc-preview-actions .button .dashicons,
.hypsc-preview-actions .button-primary .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    vertical-align: text-bottom;
    margin-right: 2px;
}

.hypsc-preview-code {
    background: #1e1e1e;
    border-radius: 6px;
    padding: 20px;
    overflow-x: auto;
    max-width: 800px;
}

.hypsc-json-block {
    background: transparent;
    color: #d4d4d4;
    font-family: 'SF Mono', 'Consolas', 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 16px 0;
    padding: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.hypsc-json-block:last-child {
    margin-bottom: 0;
}

.hypsc-json-block code {
    background: transparent;
    color: inherit;
    font-size: inherit;
}

.hypsc-preview-empty {
    color: #999;
    font-style: italic;
    margin: 0;
}

.hypsc-copy-success {
    color: #00a32a;
    font-weight: 500;
    margin-left: 8px;
    animation: hypsc-fade-in 0.2s ease;
}

@keyframes hypsc-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =============================================
   Validation Warnings
   ============================================= */

.hypsc-warnings-list {
    list-style: disc;
    margin: 8px 0 0 20px;
}

.hypsc-warnings-list li {
    margin-bottom: 4px;
}

/* =============================================
   Responsive
   ============================================= */

@media screen and (max-width: 782px) {
    .hypsc-hours-header {
        display: none;
    }

    .hypsc-hours-row {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .hypsc-hours-col-day {
        grid-column: span 2;
        font-weight: 600;
        padding-top: 8px;
        border-top: 1px solid #f0f0f1;
    }

    .hypsc-hours-row:first-child .hypsc-hours-col-day {
        border-top: none;
        padding-top: 0;
    }

    .hypsc-hours-col-closed {
        grid-column: span 2;
    }

    .hypsc-form .form-table th {
        width: auto;
    }

    .hypsc-form .regular-text,
    .hypsc-form select {
        width: 100%;
        min-width: 0;
    }

    .hypsc-tabs .nav-tab {
        padding: 4px 10px;
        font-size: 12px;
    }





}
