/* ==========================================================================
   JSON-LD Generator Core Styles
   ========================================================================== */

/* Layout Container */
.json-ld-generator-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto 0;
}

.generator-panel {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    min-width: 0;
}

/* Tab Navigation */
.type-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0px;
}

.type-tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #64748b;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.type-tab-btn:hover {
    color: #0f172a;
    background: #f8fafc;
    border-radius: 6px 6px 0 0;
}

.type-tab-btn.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

/* Tab Content Areas */
.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
    font-size: 14px;
}

.form-group label small {
    color: #64748b;
    font-weight: normal;
    margin-left: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fcfcfc;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Dynamic Item Lists (FAQ / Breadcrumb) */
.dynamic-item-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.dynamic-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dynamic-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    color: #475569;
}

.btn-remove-item {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-remove-item:hover {
    background: #fee2e2;
}

/* Action Buttons */
.btn-add-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    background: #f1f5f9;
    color: #3b82f6;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-item:hover {
    background: #e0e7ff;
    border-color: #818cf8;
    color: #4f46e5;
}

/* Output Area (Code Preview) */
.code-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.code-panel-header h3 {
    margin: 0;
    font-size: 18px;
    color: #0f172a;
}

.copy-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn:hover {
    background: #059669;
}

.copy-btn.copied {
    background: #3b82f6;
}

/* Code Editor Appearance */
.code-editor-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #1e293b;
    border: 1px solid #334155;
}

#jsonld-output {
    width: 100%;
    height: 480px;
    padding: 20px;
    background: #1e293b;
    color: #e2e8f0;
    font-family: 'Fira Code', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    border: none;
    resize: vertical;
    margin: 0;
    /* Remove default textarea margin */
    display: block;
    /* Remove default textarea inline flex gap */
}

#jsonld-output:focus {
    outline: none;
}

/* Information Box */
.info-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 16px;
    border-radius: 0 8px 8px 0;
    margin-top: 24px;
    font-size: 14px;
    color: #1e3a8a;
    line-height: 1.6;
}

.info-box a {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 600;
}

.info-box a:hover {
    color: #1d4ed8;
}

/* Error State */
.input-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}