/* IDRA CSS-Grid Based Layout */

.idra-container {
    margin-bottom: 100px;
    position: relative;
}

.idra-capture-wrapper {
    position: absolute;
    top: 100px;
    left: 55px;
    width: 90%;
    height: 95%;
    padding: 0;
    border-radius: 5px;
    border: 3px dashed transparent;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 100;
}

.idra-main-container {
    width: 100%;
    max-width: 1100px;
    padding-top: 20px;
    margin: 20px auto;
    background: #fff;
    font-family: Arial, sans-serif;
    color: #000;
}

.form-header {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 17px;
    margin: auto;
    width: auto;
}

.header-row {
    display: flex;
    align-items: center;
    gap: 25px;
}

.form-title {
    width: 500px;
    margin: 0;
    font-size: 32px;
    font-family: "Arial Narrow", Arial, Sans-Serif;
    font-weight: bold;
    font-stretch: condensed;
    transform: scaleX(0.85);
    transform-origin: left center;
    white-space: nowrap;
    text-align: left;
}

.form-header label {
    font-family: Arial, sans-serif;
    font-weight: normal;
    font-size: 18px;
    white-space: nowrap;
}

.header-input {
    flex-grow: 1;
    padding: 3px 4px;
    border: 1px solid #999999;
    border-radius: 2px;
    font-size: 18px;
    font-family: "Arial", Regular, Sans-Serif;
    background-color: #e7f3fd;
}

.input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
}

.idra-flex-layout {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    /* To allow auto margins in columns */
}

/* --- Left Column: Chart Area --- */
.idra-chart-side {
    flex: 0 0 500px;
    display: flex;
    flex-direction: column;
}

.idra-chart-stage {
    position: relative;
    width: 500px;
    height: 550px;
}

.chart-inner {
    position: relative;
    /* --- MANUELLE EINSTELLUNG: Gesamtgröße des Diagramm-Containers --- */
    width: 500px;
    height: 500px;
}

/* Background Octagon SVG */
.chart-inner svg:first-of-type {
    width: 100%;
    height: 100%;
}

/* Dynamic Polygon Overlay */
.idra-poly-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#polygon {
    stroke-opacity: 0.6;
    fill-opacity: 0.35;
    stroke-width: 2;
}

.idra-axes-labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

.idra-axis-label {
    position: absolute;
    font-size: 13px;
    font-family: Arial, sans-serif;
    white-space: nowrap;
    text-align: center;
}

.axis-pos-top {
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
}

.axis-pos-top-right {
    top: 110px;
    left: 380px;
}

.axis-pos-right {
    top: 240px;
    left: 430px;
}

.axis-pos-bottom-right {
    top: 385px;
    left: 380px;
}

.axis-pos-bottom {
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
}

.axis-pos-bottom-left {
    top: 385px;
    left: -20px;
    text-align: right;
    width: 140px;
}

.axis-pos-left {
    top: 240px;
    left: -70px;
    text-align: right;
    width: 140px;
}

.axis-pos-top-left {
    top: 110px;
    left: -20px;
    text-align: right;
    width: 140px;
}

/* --- Right Column: Form Side --- */
.idra-form-side {
    flex: 1;
}

.idra-form-grid-wrapper {
    background: #fff;
    padding: 0;
}

.idra-grid-form {
    display: table;
    border-collapse: separate;
    border-spacing: 0;
    width: auto;
}

.grid-row {
    display: table-row;
}

.grid-row.align-top .grid-label,
.grid-row.align-top .grid-content {
    vertical-align: top;
    padding-top: 12px;
}

.grid-label {
    display: table-cell;
    width: 240px;
    /* Reduced from 280px to give content more room */
    background: #fff;
    padding: 10px 15px;
    text-align: right;
    vertical-align: top;
    font-size: 14px;
    line-height: 1.2;
    border-bottom: none;
}

.grid-content {
    display: table-cell;
    background: #f2f2f2;
    padding: 6px 15px;
    vertical-align: middle;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    border-bottom: none;
    /* Removed bottom border from all rows */
    white-space: nowrap;
    text-align: left;
}

/* Article Download Button */
.article-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background-color: #ffffff;
    color: #17669d;
    text-decoration: none;
    border: 1.5px solid #17669d;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s ease;
}

.article-download-btn i {
    color: #e74c3c;
}

.article-download-btn:hover {
    background-color: #17669d;
    color: #ffffff;
}

.article-download-btn:hover i {
    color: #ffffff;
}

.risk-color-low {
    color: #008000;
}

.risk-color-moderate {
    color: #FFA500;
}

.risk-color-high {
    color: #FF0000;
}

.risk-color-na {
    color: #888888;
}

.grid-row:first-of-type .grid-content {
    border-top: 1px solid #ccc;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.grid-row:last-of-type .grid-content {
    border-bottom: 1px solid #ccc;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* White Input Fields with Borders */
.idra-grid-form input[type="number"],
.idra-grid-form input[type="text"] {
    display: inline-block;
    vertical-align: middle;
    width: 140px;
    /* Wider according to screenshot */
    padding: 6px 10px;
    border: 1.5px solid #999;
    background: #fff;
    border-radius: 2px;
    margin-right: 10px;
    font-size: 16px;
}

.idra-grid-form input[type="number"]:focus {
    border-color: #17669d;
    outline: none;
}

.grid-content span {
    display: inline-block;
    vertical-align: middle;
    font-size: 15px;
    color: #333;
}

.bl-age-hint {
    margin-left: 20px;
}

.idra-grid-form input.wide-input {
    width: 100px;
}

/* Professional Custom Radio Styling */
.radio-box-container,
.radio-stack-container,
.complexity-box {
    background: #fff;
    border: 1.5px solid #999;
    border-radius: 2px;
    padding: 6px 12px;
    display: flex;
}

.radio-box-container {
    gap: 20px;
    align-items: center;
    display: inline-flex;
}

.radio-stack-container {
    flex-direction: column;
    gap: 8px;
    width: 270px;
}

/* Susceptibility Box specialized layout */
.complexity-box {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 350px;
    box-sizing: border-box;
}

.complexity-option-row {
    padding-bottom: 5px;
}

.complexity-flex-row {
    display: flex;
    gap: 40px;
}

.comp-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.radio-box-container label,
.complexity-box label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    color: #000;
    white-space: nowrap;
    -webkit-user-select: none;
    user-select: none;
}

.radio-stack-container label {
    display: flex;
    align-items: flex-start;
    /* Align radio button to top of text */
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    color: #000;
    white-space: normal;
    /* Allow line breaks */
    line-height: 1.3;
    -webkit-user-select: none;
    user-select: none;
}

.radio-stack-container label.disabled-label,
.complexity-box label.disabled-label {
    opacity: 0.5;
    cursor: default;
    color: #999;
}

.radio-box-container label:hover,
.radio-stack-container label:hover {
    color: #17669d;
}

.radio-box-container input[type="radio"],
.radio-stack-container input[type="radio"],
.complexity-box input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #999;
    border-radius: 50%;
    background: #fff;
    margin: 0;
    display: grid;
    place-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease-in-out;
}

.radio-stack-container input[type="radio"] {
    margin-top: 2px;
}

.radio-box-container input[type="radio"]::before,
.radio-stack-container input[type="radio"]::before,
.complexity-box input[type="radio"]::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: scale(0);
    transition: 0.15s transform ease-in-out;
    background-color: #17669d;
}

.radio-box-container input[type="radio"]:checked,
.radio-stack-container input[type="radio"]:checked,
.complexity-box input[type="radio"]:checked {
    border-color: #17669d;
}

.radio-box-container input[type="radio"]:checked::before,
.radio-stack-container input[type="radio"]:checked::before,
.complexity-box input[type="radio"]:checked::before {
    transform: scale(1);
}

.radio-box-container input[type="radio"]:hover,
.radio-stack-container input[type="radio"]:hover,
.complexity-box input[type="radio"]:hover {
    border-color: #17669d;
    box-shadow: 0 0 0 3px rgba(23, 102, 157, 0.1);
}

.radio-box-container input[type="radio"]:disabled,
.radio-stack-container input[type="radio"]:disabled,
.complexity-box input[type="radio"]:disabled {
    opacity: 0.3;
    cursor: default;
    border-color: #ccc;
}

/* Results Banner */
.idra-bottom-results {
    margin-top: 30px;
    padding: 18px 25px;
    border-radius: 0;
    /* Boxy look in screenshot */
    text-align: center;
    transition: all 0.3s ease;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Modifier Classes for Risk Levels */
.idra-bottom-results.risk-low {
    background-color: #e4f9d5;
    /* Light Green */
    color: #333;
}

.idra-bottom-results.risk-moderate {
    background-color: #fee3d2;
    /* Light Orange/Beige */
    color: #333;
}

.idra-bottom-results.risk-high {
    background-color: #fddddd;
    /* Light Pink */
    color: #333;
}

.res-line-rating {
    font-size: 24px;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
    color: #444;
}

.res-line-suggestion {
    font-size: 22px;
    margin-top: 15px;
    font-weight: 500;
    color: #444;
}

/* Notices Section Below Results */
.idra-notices-container {
    margin-top: auto;
    /* Push to bottom of parent */
    padding: 20px 10px 0 10px;
    text-align: left;
}

.notices-title {
    font-size: 17px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.notices-list {
    padding-left: 20px;
    margin: 0;
    list-style-type: decimal;
}

.notices-list li {
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 8px;
    color: #444;
}

.bold {
    font-weight: bold;
}

.text-blue {
    color: #00f;
}

/* Control Buttons */
.control-button {
    padding: 0 12px;
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    background-color: #F9F9F9;
    color: #333333;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 3px 3px 5px #CCCCCC;
    margin-bottom: 50px;
}

.control-button:hover {
    background-color: #E8E8E8;
}

.control-button img {
    height: 16px;
}

.idra-capture-wrapper.hover-active {
    border-color: #17669d;
}

/* Date Display for Print */
.date-input-wrapper {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.date-print-only {
    display: none;
    font-size: 18px;
    font-family: "Arial", Regular, Sans-Serif;
    padding: 3px 4px;
}

@media print {

    /* 1. Hide unwanted UI elements - Comprehensive */
    header,
    footer,
    nav,
    .navigation,
    div.navigation,
    .header-container,
    .footer-container,
    .footer-wrapper,
    div.footer,
    div.copyright,
    .footer,
    .copyright,
    #instructions-content,
    .control-button,
    .header-row:first-of-type,
    #scroll-to-top-button,
    #cookie-banner,
    .cookie_banner,
    .cookie-banner,
    .top-menu,
    .header-menu,
    #back-button,
    .header,
    .logo,
    #logo,
    .social-icon,
    .top-menu-social,
    .language-menu-item,
    #contactModalOverlay,
    #contactModal,
    .modal-overlay,
    .modal,
    .idra-capture-wrapper,
    .article-download-btn,
    .button,
    #periodontal_chart_grids {
        display: none !important;
    }

    html,
    body {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* 2. Reset containers for print */
    .window,
    .page,
    .content,
    .idra-container {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: none !important;
        box-shadow: none !important;
        border: none !important;
        background: white !important;
        display: block !important;
    }

    .idra-main-container {
        width: 1100px !important;
        margin: 0 auto !important;
        padding-top: 0 !important;
        box-shadow: none !important;
        border: none !important;
        zoom: 0.75;
        /* Further shrink to fit 1100px onto A4 portrait */
    }

    .idra-flex-layout {
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch !important;
        width: 1100px !important;
    }

    .idra-chart-side {
        flex: 0 0 550px !important;
        width: 550px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .idra-form-side {
        flex: 1 !important;
    }

    .idra-footer-info {
        margin-top: 20px !important;
    }

    .idra-bottom-hr,
    .idra-tophr {
        display: block !important;
        border-top: 1px solid #ccc !important;
        margin: 15px 0 !important;
    }

    /* 3. Style preservation */
    .header-input {
        background-color: #e7f3fd !important;
        border: 1px solid #999 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Ensure result colors are preserved on print */
    .risk-color-low,
    .risk-color-moderate,
    .risk-color-high,
    .text-blue {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Prevent URLs from printing next to links */
    a[href]:after {
        content: none !important;
    }

    .date-input-field {
        display: none !important;
    }

    .date-print-only {
        display: inline-block !important;
    }
}

/* Tool specific capture logic (dom-to-image) uses specific styling */
.idra-main-container.is-exporting .date-input-field {
    display: none !important;
}

.idra-main-container.is-exporting .date-print-only {
    display: inline-block !important;
}

/* --- Instructions Section --- */
.manual {
    margin: 40px auto;
    width: 100%;
    max-width: 900px;
    background: white;
    padding: 20px;
    text-align: left;
}

p.manual-title {
    font-size: 24px;
    color: #333;
    font-weight: 300;
    margin-bottom: 50px;
    font-family: Heebo, Arial, sans-serif;
}

p.parameter-subtitle {
    font-weight: bold;
    font-size: 17px;
    margin-top: 20px;
    margin-bottom: 5px;
    color: #333;
    font-family: Heebo, Arial, sans-serif;
}

p.parameter-text {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 10px;
    color: #333;
    font-family: Heebo, Arial, sans-serif;
}

hr {
    margin: 40px 0;
    border: 0;
    border-top: 1px solid #E1E1E1;
}

/* --- Footer Style --- */
.idra-footer-info {
    width: 100%;
    max-width: 1100px;
    margin: 40px auto 20px;
    padding: 0 10px;
}

.idra-tophr {
    border: 0;
    border-top: 1px solid #ccc;
    margin: 15px 0;
}

.idra-bottom-hr {
    border: 0;
    border-top: 1px solid #ccc;
    margin: 10px 0;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    font-size: 13.5px;
    color: #333;
}