/**
 * Manual Styles
 * Styling for the periodontal status instruction manual.
 * Based on the user's old website design.
 */

@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;700&display=swap');

/* Main wrapper is now div.content (handled in styles.css mainly) */

.manual {
    position: relative;
    margin: auto;
    width: 720px;
    background: white;
    margin-bottom: 50px;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* General p styling within the manual */
.manual p {
    font-family: 'Heebo', Arial, Helvetica, sans-serif;
    font-size: 17px;
    font-weight: 300;
    line-height: 1.5;
    letter-spacing: 0.5px;
    color: #333333;
    margin-bottom: 15px;
}

.manual-title {
    padding-left: 20px;
    padding-top: 40px;
    padding-bottom: 10px;
    font-size: 22px !important;
    text-align: left;
    font-weight: 400 !important;
    color: #000;
}

.parameter-subtitle {
    margin-top: 50px;
    padding-left: 20px;
    font-weight: bold !important;
    text-align: left;
    font-size: 17px;
    color: #333333;
}

.parameter-sub-subtitle {
    padding-left: 30px;
    font-weight: bold !important;
    font-size: 17px;
    margin-top: 50px;
    text-align: left;
}

.parameter-text {
    padding-left: 40px;
    text-align: left;
}

.parameter-text-formel {
    margin: auto !important;
    margin-left: 40px !important;
    padding: 10px 0px 10px;
    text-align: left;
    font-size: 14px !important;
}

.highlight-formel {
    background-color: rgba(0, 223, 255, 0.10);
    border-radius: 2px;
    padding: 2px 5px 2px 5px;
    display: inline-block;
}

.highlight-formel code {
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    color: #333;
}

.parameter-reference {
    font-size: 12px !important;
    color: grey !important;
    padding-left: 40px;
    text-align: left;
}

.manual-image {
    display: block;
    margin: 30px auto;
    /* Centered */
    width: 500px;
    max-width: 100%;
    height: auto;
    border-radius: 2px;
}

/* Red circles for 1, 2, A, B icons */
.manual-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background-color: #0c304a;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    margin: 0 2px;
    vertical-align: middle;
}

@media print {
    .content:has(.manual) {
        display: none !important;
    }
}

/* Manual Simulations */
.manual-simulation-container {
    background: #fdfdfd;
    border: 1px solid #eee;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.simulation-tooth {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.simulation-inner {
    position: relative;
    overflow: hidden;
}

/* Gray out non-active parts of simulated tooth */
.simulation-tooth .tooth-column[data-is-present="false"] {
    opacity: 0.3;
}

/* Simulation Annotations */
.annotation-layer {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.annotation-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.annotation-text {
    font-size: 13px;
    line-height: 1.5;
    color: #444;
}

.simulation-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #ed90b5;
    display: inline-block;
}

/* Scoped styles for simulated interval table */
.simulation-interval .manual-simulation-container {
    padding: 0;
    border: none;
    box-shadow: none;
}

.simulation-placeholder {
    min-height: 200px;
}

/* Ensure simulated form elements look disabled but readable */
.manual-simulation-container input[readonly] {
    background: #f9f9f9;
    cursor: default;
}

.manual-circle {
    background: #000;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.manual-highlight {
    outline: 2px solid #ed90b5;
    background-color: rgba(237, 144, 181, 0.1) !important;
}

.manual-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #000;
    color: #fff;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.simulation-inner {
    overflow: hidden;
    width: 100%;
    position: relative;
}

/* Height definitions apply to the inner container to avoid clipping the legend */
.simulation-full .simulation-inner {
    height: 510px;
    /* Default height if not specified in text_data.php */
}

.simulation-quadrant .simulation-inner {
    height: 600px;
}

.simulation-tooth .simulation-inner {
    height: 400px;
}

.simulation-iframe {
    width: 100%;
    height: 100%;
    border: none;
    overflow: hidden;
    display: block;
}

.simulation-full {
    max-width: 1340px;
}

.simulation-quadrant {
    max-width: 700px;
}

.simulation-tooth {
    max-width: 200px;
}

.manual-simulation-container {
    margin: 20px 0;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    background: #fdfdfd;
}