/* Custom styles for MAHATI Documentation */

/* Original heading styles */
h1 {
    color:red !important;
    font-size: 2.5em;
}

h2 {
    color: green;
    border-bottom: 1px solid #CCCCCC;
    padding-bottom: 5px;
}

/* API Testing Center Styles */
.api-test-button {
    display: inline-block;
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white !important;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
    transition: all 0.3s ease;
}

.api-test-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(33, 150, 243, 0.4);
    text-decoration: none;
    color: white !important;
}

.api-service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.api-service-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 2px solid var(--md-primary-fg-color--light);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.api-service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.api-service-card h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.3em;
    margin-bottom: 8px;
}

.service-port {
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    margin-left: 10px;
}

.api-service-card p {
    color: #5a6c7d;
    margin: 12px 0;
    line-height: 1.5;
}

.api-service-card strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Code Generation Styles */
.codegen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.codegen-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.codegen-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
}

.codegen-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #fff, rgba(255,255,255,0.8), #fff);
}

.codegen-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.4em;
    font-weight: 600;
    color: white;
}

.codegen-card p {
    margin: 10px 0 20px 0;
    opacity: 0.9;
    font-size: 0.95em;
    line-height: 1.4;
}

.codegen-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

.codegen-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.codegen-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.02);
}

.codegen-btn:active {
    transform: scale(0.98);
}

.codegen-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.codegen-size {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
}

.advanced-codegen {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    border-left: 5px solid #667eea;
}

.advanced-codegen h3 {
    color: #2c3e50;
    margin-top: 0;
}

.advanced-codegen ul {
    list-style: none;
    padding-left: 0;
}

.advanced-codegen li {
    padding: 8px 0;
    position: relative;
    padding-left: 25px;
}

.advanced-codegen li:before {
    content: '✨';
    position: absolute;
    left: 0;
    top: 8px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Language-specific button colors */
.js-btn { border-color: #f7df1e !important; }
.ts-btn { border-color: #3178c6 !important; }
.python-btn { border-color: #3776ab !important; }
.java-btn { border-color: #ed8b00 !important; }
.csharp-btn { border-color: #239120 !important; }
.go-btn { border-color: #00add8 !important; }
.php-btn { border-color: #777bb4 !important; }
.ruby-btn { border-color: #cc342d !important; }
.rust-btn { border-color: #000000 !important; }
.nodejs-btn { border-color: #339933 !important; }
.spring-btn { border-color: #6db33f !important; }
.fastapi-btn { border-color: #009688 !important; }
.flask-btn { border-color: #000000 !important; }
.aspnet-btn { border-color: #512bd4 !important; }

.api-service-card:hover {
    border-color: var(--md-primary-fg-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.service-port {
    background: var(--md-accent-fg-color);
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-family: var(--md-code-font-family);
    font-size: 0.9rem;
    font-weight: bold;
}

.api-feature-box {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    border-left: 4px solid var(--md-primary-fg-color);
}

.api-feature-box h3 {
    color: var(--md-primary-fg-color);
    margin-top: 0;
}

.api-quick-start {
    background: var(--md-code-bg-color);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid var(--md-default-fg-color--lighter);
}

.api-quick-start h3 {
    color: var(--md-primary-fg-color);
    margin-top: 0;
}

.api-endpoint-example {
    background: #263238;
    color: #fff;
    padding: 16px;
    border-radius: 8px;
    margin: 12px 0;
    font-family: var(--md-code-font-family);
    overflow-x: auto;
}

.api-endpoint-example .method {
    color: #4CAF50;
    font-weight: bold;
}

.api-endpoint-example .url {
    color: #2196F3;
}

.api-endpoint-example .header {
    color: #FF9800;
}

/* Swagger UI Customizations */
.swagger-ui {
    font-family: var(--md-text-font-family);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.swagger-ui .info {
    margin: 20px 0;
}

.swagger-ui .info .title {
    color: var(--md-primary-fg-color);
    font-size: 2.5rem;
    font-weight: 600;
}

.swagger-ui .scheme-container {
    background: var(--md-primary-fg-color--light);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.swagger-ui .btn.authorize {
    background-color: var(--md-primary-fg-color);
    border-color: var(--md-primary-fg-color);
    font-weight: bold;
    padding: 8px 20px;
}

.swagger-ui .btn.authorize:hover {
    background-color: var(--md-primary-fg-color--dark);
    border-color: var(--md-primary-fg-color--dark);
}

/* API Operation Styling */
.swagger-ui .opblock {
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.swagger-ui .opblock.opblock-get .opblock-summary {
    border-color: #61affe;
    background: rgba(97, 175, 254, 0.1);
}

.swagger-ui .opblock.opblock-post .opblock-summary {
    border-color: #49cc90;
    background: rgba(73, 204, 144, 0.1);
}

.swagger-ui .opblock.opblock-put .opblock-summary {
    border-color: #fca130;
    background: rgba(252, 161, 48, 0.1);
}

.swagger-ui .opblock.opblock-delete .opblock-summary {
    border-color: #f93e3e;
    background: rgba(249, 62, 62, 0.1);
}

/* Enhanced Code Blocks */
.swagger-ui pre {
    background: var(--md-code-bg-color);
    border: 1px solid var(--md-default-fg-color--lightest);
    border-radius: 6px;
}

.swagger-ui .highlight-code .microlight {
    background: var(--md-code-bg-color);
}

/* API Status Indicators */
.api-status-online {
    color: #4CAF50;
    font-weight: bold;
}

.api-status-offline {
    color: #f44336;
    font-weight: bold;
}

.api-status-unknown {
    color: #ff9800;
    font-weight: bold;
}

/* Response Examples */
.api-response-example {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
}

.api-response-example .status-code {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-right: 8px;
}

.api-response-example .status-code.error {
    background: #dc3545;
}

.api-response-example .status-code.warning {
    background: #ffc107;
    color: #212529;
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .api-service-grid {
        grid-template-columns: 1fr;
    }
    
    .api-test-button {
        width: 100%;
        text-align: center;
        font-size: 16px;
        padding: 12px 20px;
    }
    
    .swagger-ui {
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    .swagger-ui {
        display: none;
    }
    
    .api-test-button {
        display: none;
    }
}

h3 {
    color: blue;
    text-decoration: underline;
}

.md-header__button.md-logo img,
.md-header__button.md-logo svg {
    height: 3.5rem; /* Adjust as needed */
    width: 3.5rem; /* Adjust as needed */
}

.md-grid {
  max-width: 100%;
}