/* Use of this code means that you have agreed to the licence agreement 
DISCLAIMER: This software is provided "as is", without warranty of any kind.
Use at your own risk.
*/

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    overflow: auto;
    width: 100vw;
    height: 100vh;
}

.item.has-note, .top-event-box.has-note, .hazard.has-note, .risk-summary.has-note {
    border: 4px solid tomato;
}

.item.has-note-thick, .top-event-box.has-note-thick, .hazard.has-note-thick, .risk-summary.has-note-thick {
    border: 4px dashed tomato;
}

.btd-extractid-container {
    position: relative;
    margin-top: 10px;
    margin-bottom: 30px;
    right: 10px;
    background-color: rgba(0, 0, 255, 0.1);
    color: blue;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

.project-title {
    position: relative;
    margin-top: 50px;
    margin-bottom: 20px;
    left: 10px;
    font-size: 50px;
    font-weight: bold;
}

.button-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

button {
    margin: 0;
    padding: 10px 20px;
}

.diagram-box {
    border: 1px solid #ccc;
    margin-bottom: 30px;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.diagram-container {
    margin-bottom: 20px;
}

.diagram {
    display: flex;
    justify-content: space-between;
    width: 100%;
    position: relative;
}

.column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.row {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    margin-top: 50px;
}

.risk-summary-container {
    margin-top: 100px;
}

.risk-summary {
    border: 1px solid black;
    padding: 10px;
    margin: 10px;
    word-wrap: break-word;
    text-align: center;
    width: 200px;
    position: relative;
}

.rta-summary {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
    background-color: white;
    gap: 10px;
}

.rta-box {
    background-color: white;
    color: black;
    padding: 10px;
    border: 1px solid black;
    border-radius: 5px;
    text-align: center;
    position: relative;
    width: 150px;
    margin-right: 10px;
}

.item, .top-event-box, .hazard, .risk-summary {
    background-color: #e0e0e0;
    padding: 10px;
    margin: 5px;
    border-radius: 5px;
    text-align: center;
    position: relative;
    width: 150px;
}

.top-event-box {
    background-color: yellow;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    word-wrap: break-word;
    max-width: 200px;
    margin-bottom: 10px;
    position: relative;
}

.hazard {
    background-color: green;
    color: white;
    padding: 20px;
    border-radius: 50%;
    text-align: center;
    word-wrap: break-word;
    max-width: 200px;
    position: relative;
}

.top-event-container {
    margin-bottom: 100px;
}

svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.info-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
	background-color: white;
    color: black;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    line-height: 20px;
    border-radius: 50%;
	border: 1px solid black;
    margin-left: 5px;
    cursor: pointer;
    position: relative;
}

.info-tooltip {
    display: none;
    position: absolute;
    background-color: #fff;
    color: #000;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #007bff;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    white-space: normal;
    z-index: 10;
    margin-top: 5px;
    width: 250px;
    max-width: 650px;
    word-wrap: break-word;
    font-weight: normal;
    font-size: 14px;
    text-align: left;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.8);
}

.info-icon:hover .info-tooltip {
    display: block;
    top: 25px;
    left: 0;
}

/* Ensure tooltips for right side elements appear on the left */
.item.consequences .info-tooltip {
    left: auto;
    right: 100%;
    margin-right: 10px;
}

.titleleft {
    text-align: left;
    width: 100%;
}

.back-button {
    margin-bottom: 20px;
    cursor: pointer;
    color: blue;
    text-decoration: underline;
    display: block;
}

.back-button:hover {
    text-decoration: underline;
}

.item:hover, .risk-summary:hover {
    background-color: #f0f0f0;
}

.notes-dialog {
    position: absolute;
    background-color: #fff;
    border: 3px solid #ccc;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.notes-dialog textarea {
    width: 100%;
    height: 100px;
}

.notes-dialog button {
    margin: 5px;
}

button {
    margin: 10px;
}

.notes-dialog .caption {
    font-weight: bold;
    margin-bottom: 5px;
}

/* Ensure notes dialog appears above and to the right for cause elements */
.column.causes .notes-dialog {
    left: auto;
    right: -100%;
}
