/* Base responsive container */
.dppb-viewer {
    border: 1px solid #e2e8f0;
    padding: 12px;
    border-radius: 6px;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
}

/* Responsive padding adjustments */
@media (max-width: 768px) {
    .dppb-viewer {
        padding: 8px;
        margin: 0 4px;
    }
}

@media (max-width: 480px) {
    .dppb-viewer {
        padding: 6px;
        margin: 0 2px;
    }
}

.dppb-viewer__header {
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.dppb-viewer__header strong {
    font-size: 18px;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .dppb-viewer__header strong {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .dppb-viewer__header strong {
        font-size: 14px;
    }
}

/* Responsive tabs */
.dppb-viewer__tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .dppb-viewer__tabs {
        gap: 2px;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .dppb-viewer__tabs {
        gap: 2px;
        border-bottom: 1px solid #e2e8f0;
    }
}

.dppb-tab-button {
    background: none;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    font-size: 14px;
    color: #666;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
}

@media (max-width: 768px) {
    .dppb-tab-button {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 70px;
    }
}

@media (max-width: 480px) {
    .dppb-tab-button {
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 4px 4px 0 0;
        margin-bottom: 0;
        border: 1px solid #e2e8f0;
        background-color: #f8f9fa;
        min-width: 60px;
        flex: 1;
    }
    
    .dppb-tab-button.dppb-tab-active {
        border-color: #041820;
        background-color: #041820;
        color: white;
    }
}

.dppb-tab-button:hover {
    background-color: #4a5568;
    color: white;
}

.dppb-tab-button.dppb-tab-active {
    background-color: #041820;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.2);
}

.dppb-tab-content {
    display: none;
    width: 100%;
    flex: 1;
}

.dppb-tab-content.dppb-tab-active {
    display: block;
    width: 100%;
    flex: 1;
}

/* Responsive body layout */
.dppb-viewer__body {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    width: 100%;
}

@media (max-width: 768px) {
    .dppb-viewer__body {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .dppb-viewer__body {
        flex-direction: column;
        gap: 16px;
    }
}

.dppb-viewer__json {
    flex: 1;
    min-width: 0;
    overflow: auto;
    max-height: 420px;
}

@media (max-width: 768px) {
    .dppb-viewer__json {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .dppb-viewer__json {
        max-height: 250px;
    }
}

.dppb-premium-notice {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.dppb-premium-notice h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.dppb-premium-notice p {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.5;
    font-size: 14px;
}

.dppb-premium-notice .dppb-button {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.dppb-premium-notice .dppb-button:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

@media (max-width: 768px) {
    .dppb-premium-notice {
        padding: 30px 16px;
    }
    
    .dppb-premium-notice h3 {
        font-size: 16px;
    }
    
    .dppb-premium-notice p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .dppb-premium-notice {
        padding: 20px 12px;
    }
    
    .dppb-premium-notice h3 {
        font-size: 15px;
    }
    
    .dppb-premium-notice p {
        font-size: 12px;
    }
    
    .dppb-premium-notice .dppb-button {
        padding: 8px 16px;
        font-size: 13px;
    }
}

.dppb-json {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    word-break: break-all;
    max-width: 100%;
    overflow-x: auto;
}

.dppb-viewer__json pre {
    margin: 0;
    padding: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    max-width: 100%;
    overflow-x: auto;
}

/* Viewer footer */
.dppb-viewer__footer {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
    color: #777;
    text-align: right;
}

.dppb-viewer__footer small {
    font-size: 12px;
}

@media (max-width: 768px) {
    .dppb-json {
        font-size: 11px;
    }
    
    .dppb-viewer__json pre {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .dppb-json {
        font-size: 10px;
    }
    
    .dppb-viewer__json pre {
        font-size: 10px;
    }
}

.dppb-error {
    color: #b00020;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Passport Content Styles - Fully Responsive */
.dppb-passport-content {
    width: 100%;
}

.dppb-manufacturer-section-title {
    width: 100%;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 16px;
    padding-bottom: 8px;
}

.dppb-manufacturer-section,
.dppb-product-section {
    margin-bottom: 24px;
    width: 100%;
}

@media (max-width: 768px) {
    .dppb-manufacturer-section,
    .dppb-product-section {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .dppb-manufacturer-section,
    .dppb-product-section {
        margin-bottom: 16px;
    }
}

.dppb-manufacturer-section h3,
.dppb-product-section h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 4px;
}

@media (max-width: 768px) {
    .dppb-manufacturer-section h3,
    .dppb-product-section h3 {
        font-size: 15px;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .dppb-manufacturer-section h3,
    .dppb-product-section h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }
}

/* Responsive manufacturer section */
.dppb-manufacturer-section {
    width: 100%;
}

.dppb-manufacturer-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    width: 100%;
}

@media (max-width: 768px) {
    .dppb-manufacturer-content {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .dppb-manufacturer-content {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        text-align: center;
    }
}

.dppb-manufacturer-logo {
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .dppb-manufacturer-logo {
        order: -1;
    }
}

.dppb-manufacturer-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background-color: #f8f9fa;
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .dppb-manufacturer-logo img {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 480px) {
    .dppb-manufacturer-logo img {
        width: 60px;
        height: 60px;
    }
}

.dppb-manufacturer-details {
    flex: 1;
    min-width: 0;
}

@media (max-width: 480px) {
    .dppb-manufacturer-details {
        width: 100%;
    }
}

.dppb-manufacturer-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 768px) {
    .dppb-manufacturer-name {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .dppb-manufacturer-name {
        font-size: 14px;
    }
}

.dppb-manufacturer-location {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 768px) {
    .dppb-manufacturer-location {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .dppb-manufacturer-location {
        font-size: 12px;
    }
}

.dppb-manufacturer-website {
    font-size: 14px;
    color: #0073aa;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 768px) {
    .dppb-manufacturer-website {
        font-size: 13px;
    }
}

/* New manufacturer item styling */
.dppb-manufacturer-item {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.dppb-manufacturer-item strong {
    color: #333;
    font-weight: 600;
    min-width: 60px;
    flex-shrink: 0;
}

.dppb-manufacturer-item span {
    color: #666;
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.dppb-manufacturer-contact,
.dppb-manufacturer-address {
    line-height: 1.6;
}

.dppb-manufacturer-contact a,
.dppb-manufacturer-website a {
    color: #0073aa;
    text-decoration: none;
}

.dppb-manufacturer-contact a:hover,
.dppb-manufacturer-website a:hover {
    text-decoration: underline;
}

/* Error styling */
.dppb-error {
    color: #dc3232;
    padding: 12px;
    background: #fff2f2;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    font-size: 14px;
}

/* Country flag styling */
.dppb-country-flag {
    display: inline-block;
    margin-right: 6px;
    vertical-align: middle;
    border: 1px solid #ddd;
    border-radius: 2px;
}

@media (max-width: 768px) {
    .dppb-manufacturer-item {
        font-size: 13px;
        flex-direction: column;
        gap: 4px;
    }
    
    .dppb-manufacturer-item strong {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .dppb-manufacturer-website {
        font-size: 12px;
    }
}

.dppb-manufacturer-website a {
    color: inherit;
    text-decoration: none;
    word-break: break-all;
}

.dppb-manufacturer-website a:hover {
    text-decoration: underline;
}

/* Responsive product details */
.dppb-product-details {
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .dppb-product-details {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .dppb-product-details {
        font-size: 12px;
    }
}

.dppb-product-details dl {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 8px 16px;
    margin: 0 0 16px 0;
}

.dppb-product-details dl:last-child {
    margin-bottom: 0;
}

/* Section titles styling */
.dppb-section-title {
    font-weight: bold;
    color: #2c5aa0;
    margin-top: 20px;
    margin-bottom: 12px;
    padding: 8px 12px;
    border-bottom: 2px solid #e2e8f0;
    font-size: 16px;
    background-color: #f8f9fa;
    border-radius: 4px 4px 0 0;
}

@media (max-width: 768px) {
    .dppb-product-details dl {
        grid-template-columns: 100px 1fr;
        gap: 6px 12px;
    }
    
    .dppb-section-title {
        font-size: 15px;
        margin-top: 12px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .dppb-product-details dl {
        grid-template-columns: 1fr;
        gap: 4px 0;
    }
    
    .dppb-product-details dt {
        font-weight: 600;
        color: #333;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 2px;
        margin-top: 8px;
    }
    
    .dppb-product-details dt:first-child {
        margin-top: 0;
    }
    
    .dppb-section-title {
        font-size: 14px;
        margin-top: 10px;
        padding: 6px 8px;
    }
    
    .dppb-product-details dd {
        margin: 0 0 8px 0;
        padding-left: 8px;
    }
}

.dppb-product-details dt {
    font-weight: 600;
    color: #333;
}

.dppb-product-details dd {
    margin: 0;
    color: #666;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Responsive country flag */
.dppb-country-flag {
    width: 20px;
    height: 15px;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .dppb-country-flag {
        width: 18px;
        height: 13px;
        margin-right: 6px;
    }
}

/* Loading state improvements */
.dppb-viewer__json em,
.dppb-product-details em {
    color: #666;
    font-style: italic;
}

/* Print styles for better printing */
@media print {
    .dppb-viewer {
        border: none;
        padding: 0;
        max-width: none;
    }
    
    .dppb-viewer__tabs {
        display: none;
    }
    
    .dppb-tab-content {
        display: block !important;
        page-break-inside: avoid;
    }
    
    .dppb-premium-notice {
        page-break-inside: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .dppb-viewer {
        border-color: #000;
    }
    
    .dppb-viewer__header,
    .dppb-viewer__tabs {
        border-bottom-color: #000;
    }
    
    .dppb-tab-button {
        border: 1px solid #000;
    }
    
    .dppb-tab-button.dppb-tab-active {
        background-color: #000;
        color: #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .dppb-tab-button {
        transition: none;
    }
}