/* Reset and Base Styles */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.documentation-app h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.documentation-app pre {
    background-color: transparent;
}

/* Commands Section */
.commands-section {
    display: flex;
    flex-direction: column;
    gap: 0rem;
}

.device-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.device-button {
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.device-button:hover {
    border-color: #d1d5db;
    background-color: #f9fafb;
}

.device-button.active {
    border-color: #000;
    background-color: #000;
    color: white;
}

.device-icon {
    width: 1rem;
    height: 1rem;
}

/* Commands List */
.commands-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.command-item {
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.command-item:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.command-item.active {
    border-color: #000;
    background-color: #000;
    color: white;
}

.command-item.active p {
    color: white;
}

.commands-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.command-text {
    font-size: 0.875rem !important;
    margin-bottom: 0 !important;
    flex: 1;
}

.command-arrow {
    width: 1rem;
    height: 1rem;
    color: #000;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.command-item:hover .command-arrow {
    color: #6b7280;
    transform: translateX(2px);
}

.command-item.active .command-arrow {
    color: white;
}

/* Info Panel */
.info-panel {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    max-height: 600px;
    overflow-y: auto;
}

.info-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.device-info-header {
    margin-bottom: 1.5rem;
}

.device-description {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    margin-top: 0.5rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.section-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.default-output-section {
    margin-bottom: 2rem;
}

.default-output {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 1rem;
    font-size: 0.75rem;
}

.components-section {
    margin-bottom: 1rem;
}

.component-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.component-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.component-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.component-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.component-commands {
    margin-bottom: 1rem;
}

.subsection-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.command-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.command-list li {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.75rem;
    color: #4b5563;
    margin-bottom: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: #f9fafb;
    border-radius: 0.25rem;
}

.component-specification {
    margin-top: 1rem;
}

.spec-table {
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    overflow: hidden;
    font-size: 0.75rem;
}

.spec-header {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 0.8fr;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.spec-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 0.8fr;
    border-bottom: 1px solid #f3f4f6;
}

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

.spec-col {
    padding: 0.75rem 0.5rem;
    border-right: 1px solid #e5e7eb;
}

.spec-col:last-child {
    border-right: none;
}

.spec-header .spec-col {
    font-weight: 600;
    color: #374151;
}

.property-name {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-weight: 500;
    color: #1f2937;
}

.allowed-values {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    color: #059669;
}

.default-value {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    color: #dc2626;
    font-weight: 500;
}

.component-link {
    color: #2563eb;
    text-decoration: none !important;
    cursor: pointer;
    transition: color 0.2s;
}

.component-link:hover {
    color: #1d4ed8;
    text-decoration: underline !important;
}

.device-output .component-link {
    color: #92400e;
}

.device-output .component-link:hover {
    color: #78350f;
    text-decoration: underline;
}

.component-link {
    color: inherit;
    text-decoration: none;
    font-weight: normal;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.component-link:hover {
    text-decoration: underline;
    background-color: rgba(0, 0, 0, 0.15);
}

.property-link {
    color: #059669;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.property-link:hover {
    color: #047857;
    text-decoration: underline;
}

.info-category {
    margin-bottom: 1rem;
}

.info-category:last-child {
    margin-bottom: 0;
}

.category-title {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.category-list {
    list-style: none;
    font-size: 0.875rem;
    color: #6b7280;
}

.category-list li {
    margin-bottom: 0.25rem;
}

/* Tips Section */
.tips-section {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.tips-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.tip-bullet {
    width: 0.5rem;
    height: 0.5rem;
    background-color: #000;
    border-radius: 50%;
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.tip-bullet.secondary {
    background-color: #9ca3af;
}

.tip-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.tip-description {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Integration Section */
.integration-section {
    display: flex;
    flex-direction: column;
}

.json-display {
    min-height: 400px;
}

.empty-state {
    text-align: center;
    padding: 3rem 0;
}

.empty-icon {
    width: 4rem;
    height: 4rem;
    color: #d1d5db;
    margin: 0 auto 1rem;
}

.empty-title {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.empty-description {
    color: #9ca3af;
}

/* JSON Sections */
.json-section {

}

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

.json-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0rem;
}

.json-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.copy-button {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.copy-button:hover {
    color: #000;
}

.copy-icon {
    width: 1rem;
    height: 1rem;
}

.json-component-link {
    color: #2563eb;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.json-component-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.json-content {
    border-radius: 0.5rem;
    padding: 0rem;
    overflow-x: auto;
    margin-bottom: 0.5rem;
}

.hub-input {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
}

.device-output {
    background-color: #fffbeb;
    border: 1px solid #fed7aa;
}

.json-code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
    color: #1f2937;
    margin: 0 !important;
}

.hub-input .json-code {
    color: #1e40af;
}

.device-output .json-code {
    color: #92400e;
}

.component-link {
    color: #2563eb;
    text-decoration: none;
    transition: all 0.2s;
}

.component-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Data Flow Guide */
.data-flow-guide {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.flow-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.flow-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flow-label {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background-color: #f3f4f6;
    font-size: 0.75rem;
}

.flow-label.command {
    background-color: #f3f4f6;
}

.flow-label.hub-input {
    background-color: #dbeafe;
}

.flow-label.device-output {
    background-color: #f3f4f6;
}

.flow-description {
    color: #6b7280;
}

/* Data Flow Guide */
.data-flow-guide {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.flow-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.flow-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flow-label {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background-color: #f3f4f6;
    font-size: 0.75rem;
}

.flow-label.command {
    background-color: #f3f4f6;
}

.flow-label.hub-input {
    background-color: #dbeafe;
}

.flow-label.device-output {
    background-color: #f3f4f6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .device-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .grid {
        gap: 1.5rem;
    }
}