.compare-page-wrapper {
    width: 90%;
    max-width: 1600px;
    margin: 20px auto;
}

.compare-box {
    width: 90%;
    max-width: 1600px;
    margin: 20px auto;
	margin-top: 0;
	margin-bottom: 30px;
    padding: 15px;
    border-radius: 10px;
    box-sizing: border-box;

    height: 140px;            
    display: flex;
    flex-direction: column;
    justify-content: center;    
	text-align: center;
}

.compare-page-title {
    text-align: center;
	margin-bottom: 10px;
	margin-top: 0;
    font-size: 2.5rem;
    letter-spacing: 1px;
	color: white;	
}

.other-subtitle {
    font-size: 1.5rem;
    color:  white;
	margin-top: 5px;
	margin-bottom: 10px;
	text-align: center;
}

.compare-search-panel {
    width: 100%;
    padding: 20px;
    background: #B3D6E3;
    border-radius: 10px;

    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.compare-search-field-wrapper {
    position: relative;
}

.compare-search-input {
    width: 100%;
    box-sizing: border-box;
    flex: 1;
    padding: 12px;

    font-weight: 600;
    font-size: 1rem;
    color: #1e3a8a;

    background: white;
    border-radius: 10px;
    
    border: none;
    
    outline: none;
}

.compare-search-input:focus {
    border: none;
    outline: none;
    box-shadow: none;
}

.compare-search-input::placeholder {
    color: #1e3a8a;
    font-weight: 500;
}

.compare-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;

    background: white;

    border-radius: 10px;

    overflow: hidden;
    overflow-y: auto;
    max-height: 300px;

    box-shadow: 0 4px 10px rgba(0,0,0,0.25);

    z-index: 1000;
}

.compare-autocomplete-item {
    padding: 12px;

    color: #1e3a8a;
    font-weight: 600;

    cursor: pointer;
}

.compare-autocomplete-item:hover,
.compare-autocomplete-item.active {
    background-color: #edf3f5;
    color: #1e3a8a;
}

.compare-selected-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    margin: 0;
    min-height: 0;
}

.compare-selected-list:empty {
    margin-top: 0;
}

.compare-selected-chip {
    all: unset;
    box-sizing: border-box;

    padding: 12px 16px;

    background: white;
    color: #1e3a8a;

    border-radius: 10px;

    font-weight: 600;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.compare-selected-chip:hover {
    transform: translateY(-3px);

    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.compare-results-grid {
    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));

    gap: 20px;
}

.compare-card {
    border-radius: 30px;
    box-sizing: border-box;
    padding: 15px;
    font-size: 1.25rem;
    color: #1e3a8a;
    background: #edf3f5;
    font-weight: 400;

}

.compare-card-title {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
}

.compare-card-title a {
    color: #1e3a8a;
    text-decoration: none;
    font-style: italic;
}

.compare-card-title a:hover {
    color: #1e3a8a;
}

.compare-card-common-name {
    display: inline;
    font-size: inherit;
    font-weight: 400;
}

.compare-card-title {
    overflow-wrap: anywhere;
}

a {
    color: #1e3a8a;
    text-decoration: underline;
    transition: color 0.2s ease, transform 0.2s ease;
}

a:hover,
a:focus {
    color: #1e3a8a;
    transform: translateY(-3px);
}

a {
    display: inline-block;
}

.compare-card-image {
    margin-bottom: 20px;
}

.compare-card-image a {
    display: block;

    overflow: hidden;
    border-radius: 10px;
}

.compare-card-image img {
    width: 100%;
    height: auto;

    display: block;

    border-radius: 10px;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.compare-card-image a:hover img {
    transform: translateY(-3px);
}

.compare-diagnostic-section {
    margin-bottom: 25px;
}

.compare-section-title {
    margin-top: 0;
    margin-bottom: 15px;

    color: #1e3a8a;
    font-size: 1.5rem;

    text-align: left;
}

.compare-trait-row {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 10px;
}

.compare-trait-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.compare-trait-label {
    font-weight: 600;
    font-size: 17px;
}

.compare-trait-value {
    font-weight: 400;
    font-size: 16px;
}


.compare-other-features {
    margin-top: 20px;
}

.compare-section-heading {
    font-weight: 700;

    margin-bottom: 10px;
}

.compare-other-features ul {
    margin: 0;
    padding-left: 20px;
}

.compare-other-features li {
    margin-bottom: 8px;

    line-height: 1.6;
}

.compare-description-section {
    display: flex;
    flex-direction: column;

    gap: 20px;
}

.compare-description-item h3 {
    margin-top: 0;
    margin-bottom: 8px;

    color: #1e3a8a;
    font-size: 20px;

    text-align: left;
}

.compare-description-item p {
    margin: 0;

    line-height: 1.6;

    text-align: left;
}

@media (max-width: 700px) {

    .compare-page-title {
        font-size: 32px;
    }

    .compare-results-grid {
        grid-template-columns: 1fr;
    }

    .compare-card-title {
        font-size: 24px;
    }

    .compare-trait-row {
        flex-direction: column;
        gap: 2px;
    }
}

.compare-card-image {
    margin-bottom: 20px;

    display: flex;
    justify-content: center;
}

.compare-card-image a {
    display: block;

    width: 100%;
    max-width: 600px;

    overflow: hidden;
    border-radius: 10px;
}

.compare-card-image img {
    width: 100%;
    height: auto;

    display: block;

    border-radius: 10px;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.compare-view-toggle {
    display: flex;
    gap: 8px;

    margin-top: 12px;

    width: 100%;
    max-width: 320px;
}

.compare-view-toggle button {
    all: unset;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 1;
    padding: 12px 20px;

    background: white;
    color: #1e3a8a;

    font-weight: 500;
    text-align: center;

    border-radius: 10px;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.compare-view-toggle button.active {
    background: #1e3a8a;
    color: white;

    transform: none;
    box-shadow: none;
    pointer-events: none;
}

.compare-view-toggle button:not(.active):hover {
    background: white;
    color: #1e3a8a;

    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.error-image {
    display: block;
    margin: 10px auto;

    width: clamp(250px, 55vw, 700px);
    height: auto;

    border-radius: 10px;
    border: 2px solid white;

    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.error {
    font-size: 25px;
    color: white;
    margin: 10px 25px;
    text-align: center;
}

.error-button {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 14px;
    background: white;
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 500;
    border-radius: 10px;

    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.error-button:hover {
    background: white;
    color: #1e3a8a;
}