/* 
 * Shared Styles for Error Documentation HTML Files
 * E-Rezept iOS App - Error Documentation System
 * Generated on 2025-09-18
 */

/* === BASE STYLES === */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
    line-height: 1.6;
    color: #333;
}

/* === LAYOUT === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* For simple layouts without container background */
.simple-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* === NAVIGATION === */
.nav-buttons {
    margin-bottom: 20px;
    text-align: center;
}

.nav-button {
    background: #007AFF;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    margin-right: 10px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.nav-button:hover {
    background: #0056b3;
}

.nav-button.active {
    background: #0056b3;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

/* === TYPOGRAPHY === */
h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 3px solid #007AFF;
    padding-bottom: 15px;
}

h2 {
    color: #333;
    margin-top: 30px;
    margin-bottom: 15px;
}

h3 {
    color: #555;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* === HEADER SECTION === */
.header {
    border-bottom: 2px solid #007AFF;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.header h1 sub {
    font-weight: normal;
    font-size: 0.6em;
    color: #666;
    top: -24px;
    position: relative;
}

/* === FORMS AND INPUTS === */
.search-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.search-button {
    background: #007AFF;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background: #0056b3;
}

.search-box {
    margin-bottom: 20px;
}

/* === UTILITY STYLES === */
.summary {
    font-size: 0.8em;
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.config-help {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.search-help {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

.cors-help {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 10px;
    margin-top: 5px;
    font-size: 12px;
    color: #856404;
}

/* === ERROR DOCUMENTATION SPECIFIC === */
.error-list {
    display: grid;
    gap: 20px;
}

.error-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.error-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.error-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #007AFF;
    margin: 0;
}

.error-code {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9em;
}

.error-meta {
    color: #666;
    font-size: 0.9em;
    margin: 10px 0;
}

.cases-section {
    margin-top: 20px;
}

.cases-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.cases-table th,
.cases-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.cases-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.case-id {
    font-family: 'Monaco', 'Consolas', monospace;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
}

.case-name {
    font-family: 'Monaco', 'Consolas', monospace;
    font-weight: 500;
}

.documentation {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    white-space: pre-wrap;
}

.related-errors {
    margin-top: 20px;
}

.related-link {
    color: #007AFF;
    text-decoration: none;
}

.related-link:hover {
    text-decoration: underline;
}

.no-cases {
    color: #666;
    font-style: italic;
}

/* === SEARCH RESULTS === */
.results-container {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.results-container::-webkit-scrollbar {
    height: 8px;
}

.results-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.results-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.results-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.result-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    min-width: 350px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.result-card h3 {
    margin-top: 0;
    color: #007AFF;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* === GRAPH VIEWER SPECIFIC === */
.flash {
    opacity: 0.1;
    animation: blink 1s;
    animation-iteration-count: 3;
}

@keyframes blink {
    50% { opacity: 1; }
}

/* Fixed searchbar for graph viewer */
#searchbar {
    width: 100%;
    position: fixed;
    top: 50px;
    left: 0;
    margin: 0;
    padding: 16px;
    background: #ddd;
    z-index: 999;
}

#searchbar h1 {
    clear: none;
    float: left;
    padding: 4px;
    margin: 0 16px 0 0;
    font: 16px/20px bold Verdana, sans-serif;
    font-weight: 600;
    border: none;
}

#searchbar input,
#searchbar button {
    font: 16px/20px Verdana, sans-serif;
}

#searchbar input[type=text] {
    width: 50%;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px;
    }
    
    .nav-button {
        padding: 8px 12px;
        margin-right: 5px;
        margin-bottom: 5px;
        font-size: 12px;
    }
    
    .search-input {
        font-size: 14px;
    }
    
    .results-container {
        flex-direction: column;
    }
    
    .result-card {
        min-width: auto;
        width: 100%;
    }
    
    #searchbar input[type=text] {
        width: 70%;
    }
}

@media (max-width: 480px) {
    .nav-buttons {
        text-align: left;
    }
    
    .nav-button {
        display: block;
        margin-bottom: 8px;
        margin-right: 0;
        text-align: center;
    }
    
    #searchbar input[type=text] {
        width: 90%;
    }
}