.page-loader {
    display: none;
}



.btn-login-mobile {
    height: 45px;
    width: 306px;
    border-radius: 23px;
    cursor: text !important;
    font: normal normal normal 15px/18px Red Hat Display;
    letter-spacing: 0px;
    color: #757575;
    opacity: 1;
}

.error-message {
    position: relative;
    background-color: #ED0314 !important;
    color: #FFFFFF !important;
    padding: 5px 10px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    font: normal normal normal 12px/16px Red Hat Display;
    margin-top: 5px;
    max-width: 154px;
    z-index: 1000;
    word-wrap: break-word;
    white-space: normal;
    overflow-wrap: break-word;
    left: 5%;
}

.custom-error-message {
    margin-top: 0px;
    left: 20%;
    max-width: 260px;
}

#btnRegister:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: all !important;
}

/* Spinner for button loading state */
.spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 767px) {
    .btn-login-mobile {
        width: 300px;
    }

    .validation-error-present .tnc-container {
        margin-top: 30px;
    }

    .username-error-icon {
        right: 18px;
        top: 13%;
    }

    .custom-error-message {
        left: 10%;
    }
}

@media (max-width: 390px) {
    .btn-login-mobile {
        width: 280px;
        border-radius: 21px;
    }

    .validation-error-present .tnc-container {
        margin-top: 30px;
        left: auto;
    }

    .custom-error-message {
        left: 6%;
    }
}

@media (max-width: 360px) {
    .btn-login-mobile {
        width: 260px;
    }

    .checkmark_register {
        left: 5px !important;
    }
}

.terms-text-login {
    cursor: pointer;
}

#TandCModal {
    z-index: 10060;
}

.modal-backdrop {
    z-index: 10050;
}

/* Toast for OTP / error messages */
#diyToastContainer {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    width: max-content;
    max-width: 90vw;
}

.diy-toast {
    background: #323232;
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    text-align: center;
}

.diy-toast.diy-toast-error {
    background: #d32f2f;
}

.diy-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.footer-table-body-text-red {
    color: #f58220 !important;
    font-weight: bold;
}

/* ─── Download prompt bottom sheet ────────────────────────────── */
#diyDownloadOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100001;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

#diyDownloadOverlay.show {
    display: flex;
}

#diyDownloadSheet {
    background: #fff;
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 480px;
    padding: 28px 24px 24px 24px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    text-align: center;
}

#diyDownloadOverlay.show #diyDownloadSheet {
    transform: translateY(0);
}

#diyDownloadAppRow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    text-align: left;
}

#diyDownloadAppIcon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
    object-fit: cover;
}

#diyDownloadAppInfo {
    flex: 1;
    min-width: 0;
}

#diyDownloadAppName {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
}

#diyDownloadAppMeta {
    font-size: 13px;
    color: #6B7280;
    display: flex;
    align-items: center;
    gap: 6px;
}

#diyDownloadAppMeta .diy-rating-star {
    color: #E37500;
    font-weight: 700;
}

#diyDownloadTitle {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

#diyDownloadSubtitle {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.5;
    margin-bottom: 24px;
}

.diy-download-btn {
    width: 100%;
    height: 48px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#diyDownloadBtn {
    background: #E37500;
    color: #fff;
    margin-bottom: 12px;
    gap: 8px;
}

#diyDownloadBtn svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

#diyContinueWebBtn {
    background: transparent;
    color: #E37500;
    font-weight: 600;
    border: 1.5px solid #E37500;
}

/* ─── Responsive styles for dynamic content ────────────────────── */

/* Override responsive-hide-content so content shows on mobile */
@media (max-width: 767px) {
    .responsive-hide-content.diy-show-on-mobile {
        display: block !important;
    }

    /* Reorder: banner → login card → content on mobile.
       .main-page and its inner wrapper are flattened via display:contents
       so their children become direct flex items of the bootstrap .row,
       letting us reorder them alongside the sibling #diyLoginCard. */
    .container-fluid > .row {
        display: flex;
        flex-direction: column;
    }
    .main-page,
    .main-page > div {
        display: contents;
    }
    #diyMobileBanner1 {
        order: 1;
    }
    #diyMobileBanner2 {
        order: 2;
    }
    #diyLoginCard {
        order: 3;
    }
    #diyContentSection {
        order: 4;
    }

    /* Force login card out of fixed/absolute positioning so it flows in
       the reordered layout instead of floating at a fixed spot.
       transform:none is required because .main-card/.main-card24 apply
       translateY(-20%) which shifts the card upward regardless of the
       position value, causing it to overlap the element above it. */
    #diyLoginCard {
        position: relative !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        margin-top: 16px !important;
    }
    #diyLoginCard .card,
    #diyLoginCard .animate-login-box {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        z-index: auto !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
        transform: none !important;
    }

    /* Analytics section — grey rounded box like verify OTP _StatsSection */
    #analyticsSection {
        background: #F3F4F6;
        border-radius: 12px;
        padding: 20px 12px !important;
        margin: 0 12px 20px 12px;
    }
    #analyticsSection .responsive-div-row {
        flex-wrap: wrap;
        gap: 16px 0;
        margin: 0 !important;
    }
    #analyticsSection .col-sm-auto {
        flex: 0 0 48%;
        max-width: 48%;
        padding: 0 8px;
    }
    #analyticsSection .responsive-footer-assets {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    #analyticsSection .font-footer-h2 {
        font-size: 22px;
        color: #E37500;
        margin-bottom: 4px;
    }
    #analyticsSection .font-size-h2 {
        font-size: 11px;
        color: #111827;
        letter-spacing: 0.5px;
        font-weight: 500;
    }
    #statDisclaimer {
        font-size: 11px;
        display: inline-block;
        padding: 8px 8px 0 8px;
        color: #6B7280;
        font-style: italic;
        line-height: 1.4;
    }

    /* Brokerage table — grey header like verify OTP _BrokerageTable */
    #brokerage_footer_table {
        font-size: 13px;
        border-collapse: separate;
        border-spacing: 0;
        border-radius: 20px 20px 0 0;
        overflow: hidden;
    }
    #brokerage_footer_table thead tr {
        background: #6B7280 !important;
    }
    #brokerage_footer_table th {
        background: #6B7280 !important;
        color: #ffffff !important;
        font-weight: 700;
        font-size: 14px;
        padding: 12px 10px;
        border: 1px solid #D1D5DB;
    }
    #brokerage_footer_table td {
        padding: 10px 8px;
        word-break: break-word;
        border: 1px solid #D1D5DB;
        font-size: 13px;
        color: #111827;
    }
    .footer-table-body-text-red {
        color: #E37500 !important;
        font-weight: bold;
        text-align: center;
    }

    /* Brokerage heading section */
    .hide-login-box-new {
        padding: 16px 12px !important;
    }

    /* T&C section responsive */
    .bg-terms-condition {
        padding: 20px 16px !important;
    }
    .font-terms-condition-heading {
        font-size: 13px !important;
        line-height: 18px !important;
    }
    .font-terms-condition-body {
        font-size: 12px !important;
        line-height: 17px !important;
    }
    .font-terms-condition-body div {
        margin-bottom: 6px;
    }

    /* Relationship text section */
    .footer-content-new {
        padding: 16px 12px !important;
        margin: 0 !important;
    }
    .responsive-footer-relationship-text {
        font-size: 14px !important;
        line-height: 20px !important;
    }

    /* Open account button */
    .open-free-demat-btn {
        width: 90% !important;
        font-size: 13px !important;
    }

    /* Footer table container */
    .footer-table {
        width: 100% !important;
        left: 0 !important;
        padding: 0 12px;
    }

    /* Layout panel full width */
    .layout-panel {
        max-width: 100% !important;
        padding: 0 !important;
    }
}

@media (max-width: 390px) {
    #brokerage_footer_table {
        font-size: 12px;
    }
    #brokerage_footer_table th {
        font-size: 12px;
        padding: 10px 6px;
    }
    #brokerage_footer_table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    #analyticsSection .col-sm-auto {
        flex: 0 0 100%;
        max-width: 100%;
    }
    #analyticsSection .font-footer-h2 {
        font-size: 20px;
    }
}
