.modal-holder {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: ease all 0.3s;
    z-index: 999;
}

.aldypay-modal{
    background-color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    visibility: hidden;
    opacity: 0;
    transition: ease all 0.3s;
    visibility: hidden;
    opacity: 0;
    transition: ease all 0.3s;
    transform: translateY(50px);
    overflow: hidden;
}

.modal-holder.o {
    visibility: visible;
    opacity: 1;
}

.modal-holder.o .aldypay-modal{
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.modal-header {
    border-bottom: 1px solid #dddddd;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
    background: linear-gradient(109deg, rgba(56, 49, 161, 1) 0%, rgba(91, 78, 210, 1) 100%);
    color: #fff;
    padding: 20px;
    box-sizing: border-box;
}

.modal-header h2 {
    font-size: 19px;
    margin: 0;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap:10px;
    width: 100%;
}

.modal-header h2 img{
    width: 40px;
    height: 40px;
}

.modal-header>.r1,
.modal-header>.r2 {
    font-size: 14px;
    font-weight: 200;
}

.modal-footer {
    padding: 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    border-top: 1px solid #dddddd;
}

.modal-content {
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 25px;
}

.modal-content>.aldypay-error {
    display: none;
    background-color: #fdecea;
    border: 1px solid #f5c6cb;
    color: #721c24;
    border-radius: 4px;
    padding: 12px 15px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    margin-bottom: -10px;
}

.modal-content>.aldypay-error.visible {
    display: block;
}

.modal-content>.step {
    display: none;
    flex-direction: column;
    align-items: stretch;
    flex: 1;
    gap: 10px;

}

.modal-content>.step-4 {
    padding: 20px;
    border-radius: 8px;
    position: relative;
    background-color: #dce7fa;
    overflow: hidden;
}

.modal-content>.step-4::after{
    content: '';
    position: absolute;
    background-image: url(../img/logo.png);
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: 40%;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}
.modal-content > .step-4 > * {
    position: relative;
    z-index: 1;
}
.modal-content .credit,
.modal-content .order-total {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: #000;
}

.modal-content .credit strong,
.modal-content .order-total strong {
    color: #232299;
    font-weight: bold;
}

.modal-content>.step.c {
    display: flex;
}

.modal-content .field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.modal-content .field label {
    font-weight: bold;
    font-size: 14px;
}

.modal-content .field input[type="text"],
.modal-content .field input[type="number"],
.modal-content .field input[type="password"] {
    box-sizing: border-box;
    padding: 10px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    width: 100%;
    outline: none;
    font-size: 16px;
}

.modal-footer button {
    padding: 10px 30px;
    background-color: #ffffff;
    color: rgb(0, 0, 0);
    border: none;
    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
}

.modal-footer button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    user-select: none;
}

.modal-footer button.btn-submit {
    background-color: #232299;
    color: #fff;
}

.modal-footer button.btn-cancel {
    background-color: #14e2fe;
    color: #fff;
}

/* Remainder amount */
.modal-content .remainder {
    width: 100%;
    display: none;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #c0392b;
    padding: 10px;
    background: #fdf2f2;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
}

.modal-content .remainder strong {
    color: #c0392b;
}

/* Gateway selection */
.modal-content .gateway-section {
    display: none;
}

.modal-content .gateway-title {
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 8px 0;
    color: #333;
}

.modal-content .gateway-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-content .gateway-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    background: #fff;
}

.modal-content .gateway-option:hover {
    border-color: #232299;
    background: #f0f0ff;
}

.modal-content .gateway-option input[type="radio"] {
    accent-color: #232299;
    margin: 0;
}

.modal-content .no-gateways {
    font-size: 13px;
    color: #999;
    padding: 8px 0;
    margin: 0;
}

.aldypay-phone-error {
    color: #721c24;
    background: #fdecea;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 13px;
    margin-top: 8px;
}

/* Login type selector */
.login-type-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.login-type-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    background: #fff;
    font-weight: normal;
    margin: 0;
}

.login-type-option input[type="radio"] {
    accent-color: #232299;
    margin: 0;
}

.login-type-option:has(input[type="radio"]:checked) {
    border-color: #232299;
    background: #f0f0ff;
    font-weight: bold;
}

.payment_method_aldypay img{
    max-height: 25px;
}