/* Container for all asset allocation items */
.asset-allocation-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 24px;
    background-color: #FFFFFF;
    margin-inline: 24px;
	border:1px solid #C2C3C9;
    border-top:none;
    align-items: flex-start;
}

/* Main investor section */
.main-investor {
    margin-inline: 24px;
}

/* Default asset-item styling for dropdown items */
.asset-item {
    flex: 1 1 calc(20% - 20px);
    box-sizing: border-box;
    padding: 20px;
    background-color: #fff;
    min-width: 200px;
    max-width: 250px;
    text-align: left;
    display:flex;
    flex-direction: column;
    justify-content: flex-start;
}

.asset-item h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #000000;
    text-align: left;
    height: 24px; /* fixed height for alignment */
    line-height: 24px; /* adjust for readability */
    overflow: hidden;
}

.asset-item h3 {
    font-size: 14px;
    color: #282B3E;
    margin-bottom: 12px;
    text-align: left;
    height: 40px; /* fixed height */
    line-height: 20px;
    overflow: hidden;
}

.asset-item p {
    font-size: 14px;
    color: #282B3E;
    margin-bottom: 10px;
    font-style: italic;
    font-weight: 400;
    line-height: 20px;
    font-family: Manulife JH Serif Optimized;
    height: 60px;
    overflow: hidden;
}

h3.sugg-description {
    width: 100%;
    height: 60px;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    text-align: left;
    margin-top: 12px;
    overflow: hidden;
}

/* Percentages section */
.percentages {
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 12px 0;
    margin-top: 10px;
    min-height: 80px;
}

.percentages span {
    display: flex;
    gap: 8px;
    font-size: 14px;
    font-weight: 400;
    line-height: normal; /* reset any inherited line-height */
    white-space: nowrap; /* prevents wrapping */
    align-items: center;

    text-overflow: ellipsis;

}

.legend-color {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}




/* Responsive adjustments */
@media (max-width: 1024px) {
    .asset-allocation-container {
        flex-direction: column;
    }
    .asset-item {
        flex: 1 1 100%;
        max-width: 100%;
    }

}


/* Hidden class */
.hidden {
    display: none;
}

/* Dropdown button */
.other-investor-button {
    background-color: #FAFAFA;
    color: #000000;
    cursor: pointer;
    border: 1px solid #C2C3C9;
    display: flex;
    padding: 0px 24px;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-family: 'Manulife JH Sans';
    font-weight: 600;
    color: #282B3E;
}

#toggleArrow {
    margin-left: 8px;
    font-size: 16px;
}

/* Selected risk container */
.selected-risk-container {
    margin-inline: 24px;
    background-color: #ffffff;
    position: relative;
    z-index: 1;
    display: block;
    margin: 0px 24px;
}

.selected-risk-container h2 {
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
    color: #282B3E;
}

/* Highlighted risk layout */
.asset-item.highlighted-risk {
    padding: 24px;
    background-color: #ffffff;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 40px;
    max-width: 100%;
}

.highlighted-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.asset-item.highlighted-risk h2,
.asset-item.highlighted-risk h3 {
    text-align: left;
}

.asset-item.highlighted-risk canvas {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}


/* Canvas default */
.asset-item canvas {
    display: block;
    width: 101px;
    height: 101px;
}


.highlighted-text .sugg-description {
    font-size: 14px;
    color: #282B3E;
    font-weight: 400;
    line-height: 20px;
}
.chart-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
}

.chart-wrapper .percentages {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: #282B3E;
}
.button-container {
    padding:40px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
}

.edit-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: #FFFFFF;
    border: 1px solid #C2C3C9;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    font-family: 'MANULIFE JH SANS', sans-serif;
    font-weight: 700;
    color: #282B3E;
    border: none !important;
}

.edit-response-icon {
    max-width: 24px;
     cursor: pointer;
}
.edit-responses {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight:600px;
}

button.start-over-button {
    background-color: #EC6453;
    border: none !important;
    height: 48px;
    min-width: 200px;

    }

a.start-over {
    display: block;
    width: 100%;
    height: 100%;
    padding: 12px;
    text-align: center;
    color: #FFF;
    font-weight: 700;
    line-height: 24px;
    font-family: 'MANULIFE JH SANS';
    text-decoration: none;
    font-size:14px;
}

.dropdown-icon{
    filter: brightness(0) saturate(100%) invert(59%) sepia(61%) saturate(749%) hue-rotate(325deg) brightness(95%) contrast(90%);
}

#toggleArrow {
    transition: transform 0.3s ease;
}

#toggleArrow.rotated {
    transform: rotate(180deg);
}
.selected-risk-container .chart-wrapper {
      display: flex;
    align-items: center;    /* Center horizontally */
    gap: 12px;

}

.selected-risk-container .percentages {
      display: flex;
      flex-direction: column;
}


.selected-risk-container .chart-wrapper .desktop-only {
    font-size: 14px;
    font-style: italic;
    color: #333;
    text-align: left;
    margin-top: 8px;
}


.selected-risk-container .chart-wrapper {
    display: flex;
    flex-direction: row; /* Donut and text block side by side */
    align-items: flex-start;
    gap: 24px;
}

.assetAllocation {
    background-color: #FFFFFF;
}

.selected-risk-container .percentages span {

    line-height: normal;
    white-space: nowrap;
    text-overflow: ellipsis;

}
.selected-risk-container .percentages {
    gap: 8px;
    padding: 0px !important;
    margin: 0px !important;

}

.selected-risk-container .percentages span.legend-color {
    border-radius: 0px !important;
}


.chart-text-block {
	display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 220px;
}

.chart-text-block .desktop-only {
    font-size: 14px;
    font-style: italic;
    color: #333;
    text-align: left;
    margin: 0;
    white-space: normal;
}
 .canvas-percentage-row {

    display: flex;
    flex-direction: column;
    min-height: 160px !important;
}

.text-block {
    min-height: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.bottom-block {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.asset-item.highlighted-risk h3 {
    margin: 0px !important;

}

@media (max-width: 768px) {
       .selected-risk-container .asset-item.highlighted-risk {
           padding: 24px;
           background-color: #ffffff;
           display: flex;
           flex-direction: row;
           justify-content: flex-start;
           align-items: center;
           gap: 40px;
           max-width: 100%;
      }

      .canvas-percentage-row {
            display: flex;
            flex-direction: row;
            gap: 12px;
            margin-bottom: 12px;
            min-height: 160px !important;
      }
       .button-container {
            flex-direction: column;
            gap: 20px;
            padding: 20px;
      }

      .button-container button {
            width: 100%;
            min-width: unset;
      }

      .edit-button,
      .start-over-button {
            margin: 0 auto;
            max-width: 200px;
      }

     .selected-risk-container h2 {
            font-size: 1.4rem;
        }
     .asset-allocation-container {
            flex-direction: column;
        }
     .asset-item {
        flex: 1 1 100%;
        max-width: 100%;
    	padding:0px !important;
    }

    .asset-item.highlighted-risk {
            flex-direction: column !important;
            align-items: flex-start !important;
            gap: 16px;
            padding:0px !important;

    }

    .asset-item.highlighted-risk canvas {
            margin-top: 16px;
            align-self: flex-start;
    }
    .notification-container .notification-layout {
            display: flex;
    }

    .highlighted-text .sugg-description {
                 margin-top: 0px;
    }
}
@media (max-width: 320px) {
     .notification-container .notification-layout {
            display: none;
        }
     .canvas-percentage-row {
              margin-bottom: 0px !important;
     }
     .percentages {
              margin: 0px !important;
     }
     .asset-item p {
            height: auto !important;
     }
}