﻿/* ============================================
   HEGA API - Custom Swagger UI Styles
   Corporate Design: Rot (#DC2626) & Neutral Grau
   ============================================ */

/* Hintergrund - Gleicher Gradient wie Landing Page */
body {
    background: linear-gradient(135deg, #f7fafc 0%, #e2e8f0 100%) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Swagger Container */
.swagger-ui {
    background: transparent !important;
}

    /* Topbar - HEGA Rot */
    .swagger-ui .topbar {
        background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%) !important;
        border-bottom: none !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
        padding: 20px 0 !important;
    }

        .swagger-ui .topbar a {
            color: white !important;
        }

        .swagger-ui .topbar .download-url-wrapper input[type=text] {
            border-color: rgba(255, 255, 255, 0.3) !important;
            background: rgba(255, 255, 255, 0.1) !important;
            color: white !important;
        }

    /* Info Section */
    .swagger-ui .info {
        background: white !important;
        padding: 40px !important;
        border-radius: 16px !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
        margin: 30px auto !important;
    }

        .swagger-ui .info .title {
            color: #DC2626 !important;
            font-size: 2.5rem !important;
            font-weight: 700 !important;
        }

        .swagger-ui .info .base-url {
            background: #f7fafc !important;
            border: 2px solid #DC2626 !important;
            color: #DC2626 !important;
            border-radius: 8px !important;
            padding: 10px 20px !important;
            font-weight: 600 !important;
        }

    /* Schemes Container */
    .swagger-ui .scheme-container {
        background: white !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
        padding: 20px !important;
        margin-bottom: 30px !important;
    }

    /* Authorize Button - HEGA Rot */
    .swagger-ui .btn.authorize {
        background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%) !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
        padding: 10px 30px !important;
        transition: all 0.3s ease !important;
        box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3) !important;
    }

        .swagger-ui .btn.authorize:hover {
            transform: translateY(-2px) !important;
            box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4) !important;
        }

        .swagger-ui .btn.authorize svg {
            fill: white !important;
        }

    /* Opblock - Endpoint Boxen */
    .swagger-ui .opblock {
        background: white !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
        margin-bottom: 20px !important;
        border: 1px solid #e2e8f0 !important;
        overflow: hidden !important;
    }

        .swagger-ui .opblock:hover {
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
        }

        /* HTTP Method Colors - Angepasst */
        .swagger-ui .opblock.opblock-get .opblock-summary-method {
            background: #DC2626 !important;
        }

        .swagger-ui .opblock.opblock-post .opblock-summary-method {
            background: #059669 !important;
        }

        .swagger-ui .opblock.opblock-put .opblock-summary-method {
            background: #D97706 !important;
        }

        .swagger-ui .opblock.opblock-delete .opblock-summary-method {
            background: #DC2626 !important;
        }

        .swagger-ui .opblock.opblock-patch .opblock-summary-method {
            background: #7C3AED !important;
        }

        /* Opblock Summary */
        .swagger-ui .opblock .opblock-summary {
            border: none !important;
            padding: 15px 20px !important;
        }

        .swagger-ui .opblock .opblock-summary-path {
            color: #1a202c !important;
            font-weight: 600 !important;
        }

        .swagger-ui .opblock .opblock-summary-description {
            color: #4a5568 !important;
        }

    /* Try it out Button */
    .swagger-ui .btn.try-out__btn {
        background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%) !important;
        color: white !important;
        border: none !important;
        border-radius: 6px !important;
        font-weight: 600 !important;
        transition: all 0.3s ease !important;
    }

        .swagger-ui .btn.try-out__btn:hover {
            transform: translateY(-1px) !important;
            box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3) !important;
        }

    /* Execute Button */
    .swagger-ui .btn.execute {
        background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%) !important;
        color: white !important;
        border: none !important;
        border-radius: 6px !important;
        font-weight: 600 !important;
        padding: 12px 30px !important;
        transition: all 0.3s ease !important;
    }

        .swagger-ui .btn.execute:hover {
            transform: translateY(-2px) !important;
            box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4) !important;
        }

    /* Response Boxes */
    .swagger-ui .responses-inner {
        background: #f7fafc !important;
        border-radius: 8px !important;
        padding: 20px !important;
    }

    .swagger-ui .response-col_status {
        color: #DC2626 !important;
        font-weight: 700 !important;
    }

    /* Models Section */
    .swagger-ui .model-box {
        background: white !important;
        border-radius: 8px !important;
        border: 1px solid #e2e8f0 !important;
    }

    .swagger-ui .model-title {
        color: #DC2626 !important;
        font-weight: 700 !important;
    }

    /* Input Fields */
    .swagger-ui input[type=text],
    .swagger-ui input[type=password],
    .swagger-ui textarea,
    .swagger-ui select {
        border: 2px solid #e2e8f0 !important;
        border-radius: 6px !important;
        background: white !important;
        transition: all 0.3s ease !important;
    }

        .swagger-ui input[type=text]:focus,
        .swagger-ui input[type=password]:focus,
        .swagger-ui textarea:focus,
        .swagger-ui select:focus {
            border-color: #DC2626 !important;
            outline: none !important;
            box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
        }

    /* Parameters Table */
    .swagger-ui table thead tr th,
    .swagger-ui table thead tr td {
        background: #f7fafc !important;
        color: #1a202c !important;
        font-weight: 700 !important;
        border-bottom: 2px solid #DC2626 !important;
    }

    /* Authorization Modal */
    .swagger-ui .dialog-ux {
        background: white !important;
        border-radius: 16px !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    }

        .swagger-ui .dialog-ux .modal-ux-header {
            background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%) !important;
            color: white !important;
            border-radius: 16px 16px 0 0 !important;
            padding: 20px !important;
        }

            .swagger-ui .dialog-ux .modal-ux-header h3 {
                color: white !important;
                font-weight: 700 !important;
            }

            /* Close Button im Modal */
            .swagger-ui .dialog-ux .modal-ux-header .close-modal {
                background: transparent !important;
                color: white !important;
                border: none !important;
            }

    /* Authorization Buttons im Modal */
    .swagger-ui .auth-btn-wrapper .btn-done {
        background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%) !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
        padding: 10px 30px !important;
    }

        .swagger-ui .auth-btn-wrapper .btn-done:hover {
            transform: translateY(-2px) !important;
            box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4) !important;
        }

    /* Cancel Button */
    .swagger-ui .btn.cancel {
        background: white !important;
        color: #DC2626 !important;
        border: 2px solid #DC2626 !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
    }

        .swagger-ui .btn.cancel:hover {
            background: #DC2626 !important;
            color: white !important;
        }

    /* Links */
    .swagger-ui a {
        color: #DC2626 !important;
        text-decoration: none !important;
    }

        .swagger-ui a:hover {
            color: #991B1B !important;
            text-decoration: underline !important;
        }

    /* Loading Animation */
    .swagger-ui .loading-container .loading:after {
        border-color: #DC2626 transparent transparent !important;
    }

    /* Scrollbar Styling */
    .swagger-ui ::-webkit-scrollbar {
        width: 12px !important;
        height: 12px !important;
    }

    .swagger-ui ::-webkit-scrollbar-track {
        background: #f7fafc !important;
        border-radius: 6px !important;
    }

    .swagger-ui ::-webkit-scrollbar-thumb {
        background: #DC2626 !important;
        border-radius: 6px !important;
    }

        .swagger-ui ::-webkit-scrollbar-thumb:hover {
            background: #991B1B !important;
        }

    /* Version Select */
    .swagger-ui select {
        background: white !important;
        border: 2px solid #DC2626 !important;
        color: #DC2626 !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
        padding: 8px 15px !important;
    }

    /* Markdown Description */
    .swagger-ui .markdown p,
    .swagger-ui .markdown li {
        color: #4a5568 !important;
        line-height: 1.8 !important;
    }

    .swagger-ui .markdown h1,
    .swagger-ui .markdown h2,
    .swagger-ui .markdown h3,
    .swagger-ui .markdown h4,
    .swagger-ui .markdown h5 {
        color: #1a202c !important;
        font-weight: 700 !important;
        border-bottom: 2px solid #DC2626 !important;
        padding-bottom: 10px !important;
        margin-top: 30px !important;
    }

    /* Response Status Colors */
    .swagger-ui .response-col_status.response-col_status-200 {
        color: #059669 !important;
    }

    .swagger-ui .response-col_status.response-col_status-default {
        color: #DC2626 !important;
    }

    /* Highlight JSON/Code */
    .swagger-ui .highlight-code {
        background: #1a202c !important;
        border-radius: 8px !important;
    }

        .swagger-ui .highlight-code .microlight {
            color: #e2e8f0 !important;
        }

    /* Info Contact Links */
    .swagger-ui .info a {
        color: #DC2626 !important;
        font-weight: 600 !important;
    }

        .swagger-ui .info a:hover {
            color: #991B1B !important;
        }

    /* Lock Icon für Authorization */
    .swagger-ui .authorization__btn svg {
        fill: #DC2626 !important;
    }

    .swagger-ui .authorization__btn.locked svg {
        fill: #059669 !important;
    }

    /* Errors */
    .swagger-ui .errors-wrapper {
        background: #FEE2E2 !important;
        border: 2px solid #DC2626 !important;
        border-radius: 8px !important;
        padding: 15px !important;
        margin: 15px 0 !important;
    }

        .swagger-ui .errors-wrapper .error-wrapper {
            color: #991B1B !important;
        }
