.page-layout {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-height: 100vh;
    position: relative;
    overflow: visible;
}

.wizard-container {
    z-index: 1;
    position: relative;
}


.button-container {
    flex-shrink: 0;
    display: flex;
    flex-direction: row-reverse;
}

.button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 55px;
    padding: 40px;
    margin-top: 2%;
    margin-bottom: 2%;
}

.button-continue {
    margin-right: 1%;
    float: right;
}

.button.disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
}

.button.disabled .button-link {
    cursor: not-allowed !important;
    pointer-events: none;
}

.button.disabled .button-text {
    color: #999 !important;
}

.button.disabled + .button-line {
    opacity: 0.5;
}

.button-line {
    width: 3px;
    height: 30px;
    background-color: #ccc;
    margin: auto;
}

.button-arrow {
    width: 17px;
    height: 17px;
    border-top: 3px solid #0e2050;
    border-right: 3px solid #0e2050;
    transform: scaleX(0.9) rotate(45deg);
    margin-top: 2.25vh;
    margin-left: -0.5vh;
}

.button-link {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 1.2em;
    color: #fff;
    background-color: #0e2050;
    padding: 0;
    border-radius: 20px;
    transition: background-color 0.3s;
    width: 100%;
    height: 100%;
}

.button-text {
    font-size: 10px;
    text-align: center;
    color: #fff;
    padding: 20px;
}


/* Specific line colors based on active button */
#line1.active,
#line2.active,
#line3.active,
#line4.active,
#line5.active,
#line6.active,
#line7.active {
    background-color: #0e2050;
}

#text1.active,
#text2.active,
#text3.active,
#text4.active,
#text5.active,
#text6.active,
#text7.active {
    color: #ffe600;
    font-weight: bold;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

/* --- Responsive Design --- */

@media (max-width: 599px) {
    .button-text {
        font-size: 0.59rem;
    }

    .button {
        padding: 0.01rem 0.3rem;
        width: 100px;
        height: 35px;
    }

    .button-line {
        height: 10px;
    }

    .button-container {
        padding-left: 2.5%;
        padding-right: 10%;
    }

    .button-arrow {
        width: 9px;
        height: 9px;
    }
}

@media (min-width: 600px) and (max-width: 799px) {
    .button-text {
        font-size: 0.65rem;
    }

    .button {
        padding: 0.02rem 0.4rem;
        width: 110px;
        height: 35px;
    }

    .button-line {
        height: 15px;
    }

    .button-container {
        padding-right: 5%;
    }

    .button-arrow {
        width: 10px;
        height: 10px;
    }
}

@media (min-width: 800px) and (max-width: 1023px) {
    .button-text {
        font-size: 0.7rem;
    }

    .button {
        padding: 0.03rem 0.6rem;
        width: 120px;
        height: 40px;
    }

    .button-line {
        height: 20px;
    }

    .button-arrow {
        width: 12px;
        height: 12px;
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    .button-text {
        font-size: 0.75rem;
    }

    .button {
        padding: 0.04rem 0.7rem;
        width: 130px;
        height: 40px;
    }

    .button-line {
        height: 25px;
    }

    .button-arrow {
        width: 13.5px;
        height: 13.5px;
    }
}

@media (min-width: 1280px) and (max-width: 1439px) {
    .button-text {
        font-size: 0.85rem;
    }

    .button {
        padding: 0.05rem 0.8rem;
        width: 140px;
        height: 45px;
    }

    .button-arrow {
        width: 15px;
        height: 15px;
    }
}

@media (min-width: 1440px) and (max-width: 1919px) {
    .button-text {
        font-size: 0.9rem;
    }

    .button {
        padding: 0.08rem 0.9rem;
        width: 180px;
        height: 50px;
    }
}

@media (min-width: 1920px) {
    .button-text {
        font-size: 1.0rem;
    }

    .button {
        padding: 0.1rem 1.0rem;
    }
}

textarea.form-control {
    min-height: 80px;
    resize: vertical;
    overflow-y: hidden;
    transition: height 0.1s ease;
    line-height: 1.5;
    font-family: inherit;
}

textarea.auto-expand {
    overflow-y: auto;
    max-height: 400px;
}

textarea[name*="description"] {
    min-height: 120px;
}

.artifacts-title-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.artifacts-hint {
    font-size: 0.85rem;
    color: #6c757d;
}

#submissionPopupOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#submissionPopupOverlay.active {
    display: flex;
}

#submissionPopup {
    background: #fff;
    border-radius: 12px;
    padding: 36px 40px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    text-align: center;
    position: relative;
    animation: popupFadeIn 0.25s ease;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#submissionPopup .popup-icon {
    font-size: 52px;
    line-height: 1;
    margin-bottom: 14px;
}

#submissionPopup .popup-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

#submissionPopup .popup-body {
    font-size: 15px;
    color: #444;
    margin-bottom: 22px;
}

#submissionPopup.popup-success .popup-title {
    color: #28a745;
}

#submissionPopup.popup-error .popup-title {
    color: #dc3545;
}

.countdown-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
}

.countdown-ring-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.countdown-ring {
    width: 36px;
    height: 36px;
    transform: rotate(-90deg);
}

.countdown-ring circle {
    fill: none;
    stroke-width: 3;
}

.countdown-ring .track {
    stroke: #e0e0e0;
}

.countdown-ring .fill {
    stroke: #28a745;
    stroke-linecap: round;
    stroke-dasharray: 87.96;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 3s linear;
}

#submissionPopup.popup-error .countdown-ring .fill {
    stroke: #dc3545;
}

.countdown-number {
    position: absolute;
    font-size: 11px;
    font-weight: 700;
    color: #555;
}

#popupCloseBtn {
    display: none;
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

#popupContinueBtn {
    display: none;
    margin-top: 6px;
    padding: 9px 28px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

#popupContinueBtn:hover {
    background: #218838;
}

#artifactSuccessPopupOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#artifactSuccessPopupOverlay.active {
    display: flex;
}

#artifactSuccessPopup {
    background: #fff;
    border-radius: 12px;
    padding: 36px 40px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    text-align: center;
    animation: artifactPopupFadeIn 0.25s ease;
}

@keyframes artifactPopupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#artifactSuccessPopup .popup-icon {
    font-size: 52px;
    line-height: 1;
    margin-bottom: 14px;
}

#artifactSuccessPopup .popup-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #28a745;
}

#artifactSuccessPopup .popup-body {
    font-size: 15px;
    color: #444;
    margin-bottom: 22px;
}

#artifactSuccessPopup .countdown-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
}

#artifactSuccessPopup .countdown-ring-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#artifactSuccessPopup .countdown-ring {
    width: 36px;
    height: 36px;
    transform: rotate(-90deg);
}

#artifactSuccessPopup .countdown-ring circle {
    fill: none;
    stroke-width: 3;
}

#artifactSuccessPopup .countdown-ring .track {
    stroke: #e0e0e0;
}

#artifactSuccessPopup .countdown-ring .fill {
    stroke: #28a745;
    stroke-linecap: round;
    stroke-dasharray: 87.96;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 3s linear;
}

#artifactSuccessPopup .countdown-number {
    position: absolute;
    font-size: 11px;
    font-weight: 700;
    color: #555;
}

.field-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.group-error .radio-group {
    border: 1px solid #dc3545;
    border-radius: 6px;
    padding: 8px;
}

.group-error label {
    color: #dc3545;
}

.duplicate-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.duplicate-modal {
    background: #fff;
    border-radius: 12px;
    padding: 36px 40px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    text-align: center;
    animation: rsFadeIn 0.25s ease;
}

.duplicate-modal-icon {
    font-size: 3.2rem;
    color: #c0392b;
    margin-bottom: 10px;
    line-height: 1;
}

.duplicate-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #c0392b;
    margin: 0 0 16px 0;
    width: 100%;
    text-align: center;
    display: block;
}

.duplicate-modal-message {
    font-size: 0.95rem;
    color: #212529;
    margin: 0 0 24px 0;
}

.duplicate-modal-footer {
    display: flex;
    justify-content: center;
}