/* ===== Wrapper ===== */
#w0 {
    max-width: 760px;
    margin: 30px auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ===== Grid ===== */
#w0 .row {
    display: flex;
    gap: 15px;
    margin-bottom: 18px;
}

#w0 .col-sm-6 {
    flex: 1;
}

/* ===== Input group ===== */
#w0 .input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

#w0 .input-group-addon {
    background: #f1f3f6;
    border: 1px solid #dcdcdc;
    border-right: 0;
    padding: 0 14px;
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
    border-radius: 8px 0 0 8px;
}

#w0 .input-group-addon input {
    border: none;
    background: transparent;
    padding: 0;
    width: auto;
    font-size: 14px;
    color: #555;
}

/* ===== Inputs ===== */
#w0 input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
}

#w0 .input-group input {
    border-radius: 0 8px 8px 0;
}

#w0 input::placeholder {
    color: #999;
}

#w0 input:focus {
    outline: none;
    border-color: #528ff0;
    box-shadow: 0 0 0 2px rgba(82,143,240,0.15);
}

/* ===== Validation ===== */
#w0 input.error {
    border-color: #e74c3c;
}

#w0 .error-text {
    font-size: 13px;
    color: #e74c3c;
    margin-top: 4px;
}

/* ===== Fee preview ===== */
#w0 .fee-preview {
    background: #f7f9fc;
    border: 1px dashed #ccd6eb;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
}

#w0 .fee-preview p {
    margin: 6px 0;
    font-size: 14px;
}

#w0 .fee-preview .total {
    font-size: 16px;
    font-weight: 600;
    color: #1a73e8;
}

/* ===== Button ===== */
#w0 button#subm {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #528ff0, #1a73e8);
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

#w0 button#subm:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(26,115,232,0.35);
}

#w0 button#subm:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ===== Message ===== */
#rfp-message {
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
}

#rfp-message.success { color: #2ecc71; }
#rfp-message.error { color: #e74c3c; }

/* ===== Phone input fix ===== */
#w0 .input-group-addon {
    background: #f1f3f6;
    border: 1px solid #dcdcdc;
    border-right: none;
    padding: 0 12px;
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
    border-radius: 8px 0 0 8px;
    min-width: 60px;
    justify-content: center;
}

/* Make the inner input behave like plain text */
#w0 .input-group-addon input {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    width: auto;
    height: auto;
    font-size: 14px;
    color: #555;
    text-align: center;
    pointer-events: none; /* disables cursor */
}

/* Main phone input */
#w0 .input-group input#paymentmaster-phone {
    border-radius: 0 8px 8px 0;
    padding-left: 12px;
}

.input-group[class*="col-"] {
    float: none;
    padding-right: 15px !important;
    padding-left: 15px!important;
}
/* ===== Normalize row height ===== */
#w0 .row {
    align-items: center;
}

/* ===== Normalize input-group height ===== */
#w0 .input-group {
    height: 100%;
}

/* Force same height for addon + input */
#w0 .input-group-addon,
#w0 .input-group input {
    height: 44px;
    box-sizing: border-box;
}

/* Match normal input height */
#w0 input:not(.country-code) {
    height: 44px;
    line-height: 44px;
}

/* Prevent addon from stretching row */
#w0 .input-group-addon {
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ===== Mobile ===== */
@media (max-width: 640px) {
    #w0 {
        padding: 20px 15px;
    }

    #w0 .row {
        flex-direction: column;
        gap: 12px;
    }

    #w0 .input-group-addon {
        padding: 0 10px;
        font-size: 13px;
    }
}
