/* API Page Specific Styles */

/* API Hero Section */
.api-hero {
    background: var(--white);
    padding: 3rem 0;
    border-bottom: 3px solid var(--primary-color);
}

.api-title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.api-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-transform: uppercase;
}

.api-intro {
    max-width: 50rem;
    margin: 0 auto;
    text-align: center;
}

.api-intro h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--black);
}

.api-intro p {
    font-size: 1.125rem;
    color: var(--gray-dark);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.api-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid;
}

.badge.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-color: #fecaca;
}

.badge.warning {
    background: rgba(248, 180, 0, 0.1);
    color: #92400e;
    border-color: var(--primary-color);
}

.badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-color: #a7f3d0;
}

/* API Documentation */
.api-docs {
    background: var(--gray-light);
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.endpoint-card {
    background: var(--white);
    border-radius: 0.5rem;
    border: 1px solid var(--gray-200);
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .endpoint-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }
}

.http-method {
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.http-method.get {
    background: #10b981;
    color: white;
}

.http-method.post {
    background: var(--primary-color);
    color: var(--black);
}

.http-method.delete {
    background: #ef4444;
    color: white;
}

.http-method.patch {
    background: #8b5cf6;
    color: white;
}

.http-method.put {
    background: #f59e0b;
    color: white;
}

.endpoint-url {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--black);
    background: var(--white);
    padding: 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid var(--gray-300);
    word-break: break-all;
    overflow-wrap: break-word;
}

@media (max-width: 768px) {
    .endpoint-url {
        font-size: 0.875rem;
        width: 100%;
        box-sizing: border-box;
    }
}

.endpoint-description {
    color: var(--gray-dark);
    font-size: 0.875rem;
    flex: 1;
    min-width: 200px;
}

.endpoint-body {
    padding: 1.5rem;
}

.endpoint-body h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--black);
}

.code-block {
    background: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    border-left: 4px solid var(--primary-color);
    word-break: break-all;
    overflow-wrap: break-word;
}

@media (max-width: 768px) {
    .code-block {
        font-size: 0.75rem;
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .code-block pre {
        white-space: pre-wrap;
        word-break: break-word;
    }
}

.code-block:last-child {
    margin-bottom: 0;
}

/* API Status */
.api-status {
    background: var(--white);
    padding: 4rem 0;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--gray-light);
    border-radius: 0.5rem;
    border-left: 4px solid var(--gray-300);
}

.status-indicator {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    display: block;
    box-sizing: border-box;
}

.status-indicator.online {
    background: #10b981;
    animation: pulse 2s infinite;
}

.status-indicator.warning {
    background: var(--primary-color);
}

.status-indicator.error {
    background: #ef4444;
}

/* New dedicated status dots */
.schnuefa-status-dot {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    position: relative !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.schnuefa-status-dot.online {
    background: #10b981 !important;
    animation: statusPulse 2s ease-in-out infinite !important;
}

.schnuefa-status-dot.warning {
    background: var(--primary-color) !important;
}

.schnuefa-status-dot.error {
    background: #ef4444 !important;
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.status-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--black);
}

.status-info p {
    font-size: 0.875rem;
    color: var(--gray-dark);
    margin: 0;
}

/* Warning Section */
.api-warning {
    background: var(--gray-light);
    padding: 4rem 0;
}

.warning-box {
    max-width: 50rem;
    margin: 0 auto;
    background: rgba(239, 68, 68, 0.05);
    border: 2px solid #fecaca;
    border-radius: 0.5rem;
    padding: 2rem;
}

.warning-box h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: 1rem;
}

.warning-box p {
    font-size: 1rem;
    color: #991b1b;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.warning-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.warning-details li {
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: #7f1d1d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Compatibility Section */
.api-compatibility {
    background: var(--white);
    padding: 4rem 0;
}

.compatibility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.compat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gray-light);
    border-radius: 0.5rem;
    border: 1px solid var(--gray-200);
}

.compat-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--black);
    margin: 0;
}

.compat-status {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.compat-status.success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.compat-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Navigation Active State - Override to match components.css */
.nav-menu a.active {
    background: var(--primary-color) !important;
    color: var(--black) !important;
    font-weight: 700 !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-indent: 0 !important;
    font-size: 0.9rem !important;
    line-height: normal !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .api-title {
        font-size: 2rem;
        word-break: break-word;
    }
    
    .api-subtitle {
        font-size: 1.25rem;
        word-break: break-word;
    }
    
    .api-intro h3 {
        font-size: 1.25rem;
    }
    
    .api-intro p {
        font-size: 1rem;
    }
    
    .api-badges {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .badge {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
    
    .endpoint-card {
        margin-bottom: 1.5rem;
        overflow: hidden;
    }
    
    .endpoint-body {
        padding: 1rem;
    }
    
    .status-grid,
    .compatibility-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .compat-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .warning-box {
        margin: 0 1rem;
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
        word-break: break-word;
    }
}

/* Footer Status Notes */
.status-note {
    font-size: 0.75rem !important;
    color: #d97706 !important;
    font-style: italic;
    margin: 0.25rem 0 !important;
}

.fax-note {
    font-size: 0.75rem !important;
    color: #dc2626 !important;
    margin: 0.5rem 0 0 0 !important;
}

@media (max-width: 480px) {
    .api-hero {
        padding: 2rem 0;
    }
    
    .api-title {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .api-subtitle {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    .api-docs,
    .api-status,
    .api-warning,
    .api-compatibility {
        padding: 2rem 0;
    }
    
    .warning-box {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .endpoint-card {
        margin-bottom: 1.5rem;
    }
    
    .endpoint-header,
    .endpoint-body {
        padding: 0.75rem;
    }
    
    .endpoint-url {
        font-size: 0.75rem;
        padding: 0.375rem;
    }
    
    .http-method {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
    
    .endpoint-description {
        font-size: 0.8rem;
        margin-top: 0.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        padding: 0 1rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}