.bubble {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background-color: tomato;
}

.bubble:nth-child(1) {
    left: 10%;
    top: 10%;
    position: absolute;
    background-color: var(--primary-color);
}

.bubble:nth-child(2) {
    position: absolute;
    right: 10%;
    bottom: 5%;
    background-color: #ff6b79;
}

.bubble:nth-child(3) {
    width: 300px;
    height: 300px;
    position: absolute;
    left: 9%;
    bottom: 15%;
    background-color: #ffd860;
    z-index: 1;
}

.buttons {
    display: flex;
    gap: 12px;
    padding: 20px 0;
    justify-content: center;
}

.buttons a {
    text-align: center;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    color: white;
    background-color: var(--primary-color);
    border: 0 solid var(--primary-color-darker);
    border-bottom-width: 8px;
    cursor: pointer;
}

button {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    border-width: 0 0 8px 0;
    border-color: var(--primary-color-darker);
}

.input {
    display: flex;
    flex-direction: column;
    transition: height 0.3s ease;
}

.field-error {
    font-size: 0.8em;
    color: var(--error-background-color);
    margin-top: var(--margin-xsm-size);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease,
        visibility 0.3s;
}

.field-error.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.input-wrapper.error {
    border-color: var(--error-background-color);
    color: var(--error-background-color);
}

.input-wrapper {
    display: flex;
    padding: 10px 15px;
    border: 0 solid var(--input-font-color);
    color: var(--input-font-color);
    border-width: 0 0 2px 0;
    font-size: 1em;
    transition: color 0.3s ease;
}

.input-wrapper input {
    transition: color 0.3s ease;
}

.input-wrapper i {
    margin-right: 10px;
}

.input-wrapper input {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    font-size: 1em;
    color: var(--input-font-color);
}

.toast {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: var(--margin-sm-size);
    position: fixed;
    top: var(--margin-sm-size);
    right: var(--margin-sm-size);
    padding: var(--margin-xsm-size) var(--margin-sm-size);
    border-radius: var(--margin-sm-size);
    z-index: 10;

    background-color: var(--info-background-color);
    color: var(--info-font-color);

    transform: translateX(calc(100% + var(--margin-sm-size)));
    opacity: 0;
    transition:
        transform 0.4s ease,
        opacity 0.4s ease;
}

.toast.visible {
    transform: translateX(0);
    opacity: 1;
}

.toast.warn {
    background-color: var(--warn-background-color);
    color: var(--warn-font-color);
}

.toast.error {
    background-color: var(--error-background-color);
    color: var(--error-font-color);
}

.toast i {
    font-size: var(--icon-font-size);
}

.dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--margin-sm-size);
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.dialog.active {
    opacity: 1;
    visibility: visible;
}

.dialog-content {
    display: flex;
    flex-direction: column;
    width: min(500px, 100%);
    max-height: 100vh;
    max-height: 100dvh;
    background-color: white;
    border-radius: 8px;
    padding: clamp(1.25em, 4vw, 2em);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--margin-sm-size);
    flex-shrink: 0;
    margin-bottom: 1.5em;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1em;
}

.dialog-header h2 {
    margin: 0;
    font-size: clamp(1.15em, 4.5vw, 1.5em);
    color: var(--info-font-color);
}

.dialog-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--input-font-color);
    transition: color 0.3s ease;
    padding: 0;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog-close:hover {
    color: var(--error-font-color);
}

.dialog-body {
    margin-bottom: 1.5em;
    color: var(--info-font-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    max-height: 400px;
    min-height: 0;
}

.dialog-body-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: auto;
}

.dialog-subjects-scroll {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1em;
}

.dialog-quantity-section {
    flex-shrink: 0;
}

@media (max-height: 500px) {
    .dialog-content {
        overflow-y: auto;
    }

    .dialog-body,
    .dialog-body-wrapper,
    .dialog-subjects-scroll {
        flex-shrink: 0;
        height: auto;
        max-height: none;
        overflow: visible;
    }
}

.breadcrumb-trail {
    display: flex;
    gap: 0;
    margin-bottom: 1em;
    padding: 4px 0;
    align-items: center;
    overflow-x: auto;
}

.breadcrumb-trail-item {
    position: relative;
    padding: 0.75em 1.5em 0.75em 1.2em;
    background-color: var(--primary-color);
    color: white;
    flex: 0 0 auto;
    white-space: nowrap;
    z-index: 10;
}

.breadcrumb-trail-item:not(:first-child) {
    margin-left: -18px;
    padding-left: 2.5em;
    z-index: 11;
}

.breadcrumb-trail-item:nth-child(2) {
    z-index: 12;
}

.breadcrumb-trail-item:nth-child(3) {
    z-index: 13;
}

.breadcrumb-trail-item:nth-child(4) {
    z-index: 14;
}

.breadcrumb-trail-item:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    border-left: 2px solid rgba(0, 0, 0, 0.2);
}

.breadcrumb-trail-item:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    border-right: 2px solid rgba(0, 0, 0, 0.2);
}

.breadcrumb-trail-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 25px solid var(--primary-color);
    border-top: 25px solid transparent;
    border-bottom: 25px solid transparent;
    z-index: 100;
    filter: drop-shadow(2px 0 0 rgba(0, 0, 0, 0.3));
}

.dialog-footer {
    display: flex;
    gap: 1em;
    justify-content: flex-end;
    flex-shrink: 0;
}

.dialog-footer button {
    padding: 10px 25px;
    font-size: 1em;
    flex: 1;
}

.dialog-footer button:last-child {
    flex: 0;
    min-width: 100px;
}
