/* Custom Schema Admin Styles */

.schematiq-admin {
    max-width: 1200px;
}

.schematiq-tabs {
    margin-top: 20px;
}

.schematiq-tabs .nav-tab-wrapper {
    border-bottom: 1px solid #ccc;
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
}

.schematiq-tabs .nav-tab {
    margin-right: 5px;
    margin-bottom: -1px;
    padding: 8px 12px;
}

.schematiq-tabs .nav-tab-active {
    border-bottom-color: #fff;
    background: #fff;
}

.tab-content {
    display: none;
    padding: 20px;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    margin-top: 0;
    padding-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.tab-content h3 {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.tab-content .form-table {
    margin-top: 0;
}

.tab-content .form-table th {
    width: 200px;
    padding: 20px 10px 20px 0;
    vertical-align: top;
}

.tab-content .form-table td {
    padding: 15px 10px;
}

.tab-content input[type="text"],
.tab-content input[type="url"],
.tab-content input[type="email"],
.tab-content input[type="tel"],
.tab-content input[type="number"],
.tab-content input[type="date"],
.tab-content input[type="datetime-local"] {
    width: 100%;
    max-width: 500px;
}

.tab-content input.small-text {
    width: 100px;
    max-width: 100px;
}

.tab-content textarea {
    width: 100%;
    max-width: 600px;
}

.tab-content textarea.code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.tab-content pre {
    margin: 10px 0;
    padding: 10px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    overflow-x: auto;
}

.tab-content .description {
    color: #646970;
    font-style: italic;
    margin-top: 5px;
}

/* Overview Tab - Schema Toggles */
#tab-overview .form-table th {
    width: 200px;
}

#tab-overview .form-table td {
    padding: 15px 10px;
}

#tab-overview input[type="checkbox"] {
    margin-right: 8px;
}

#tab-overview label {
    display: inline-block;
}

/* Compound Fields */
.schema-compound-field {
    background: #f9f9f9;
    padding: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.schema-compound-field p {
    margin: 0 0 15px 0;
}

.schema-compound-field p:last-child {
    margin-bottom: 0;
}

.schema-compound-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.schema-inline-fields {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.schema-inline-fields label {
    display: inline;
    font-weight: normal;
}

/* FAQ Repeater */
.schema-faq-repeater {
    max-width: 700px;
}

.faq-items {
    margin-bottom: 15px;
}

.faq-item {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 10px;
}

.faq-item:hover {
    border-color: #2271b1;
}

.faq-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
    cursor: move;
}

.faq-number {
    font-weight: 600;
    color: #2271b1;
    font-size: 14px;
}

.remove-faq-item {
    color: #b32d2e !important;
    text-decoration: none;
}

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

.faq-item p {
    margin: 0 0 10px 0;
}

.faq-item p:last-child {
    margin-bottom: 0;
}

.faq-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.faq-item input[type="text"],
.faq-item textarea {
    width: 100%;
    max-width: 100%;
}

.add-faq-item {
    margin-top: 10px;
}

/* Image Preview */
.schema-image-preview {
    margin-top: 10px;
}

.schema-image-preview img {
    max-width: 150px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.schema-media-upload {
    margin-left: 10px !important;
}

/* Upgrade Notice */
.schematiq-upgrade-notice {
    margin-top: 20px;
}

.schematiq-upgrade-notice .button {
    margin-left: 10px;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .schematiq-tabs .nav-tab-wrapper {
        flex-direction: column;
    }
    
    .schematiq-tabs .nav-tab {
        margin-right: 0;
        margin-bottom: 2px;
        border-bottom: 1px solid #ccc;
    }
    
    .tab-content .form-table th,
    .tab-content .form-table td {
        display: block;
        width: 100%;
        padding: 10px 0;
    }
    
    .tab-content input[type="text"],
    .tab-content input[type="url"],
    .tab-content input[type="email"],
    .tab-content input[type="tel"],
    .tab-content input[type="number"],
    .tab-content textarea {
        max-width: 100%;
    }
    
    .schema-inline-fields {
        flex-direction: column;
        align-items: flex-start;
    }
}
