/*
File: assets/css/user/public-user-registration.css
Purpose: Standalone public User Registration Form. Centered screen UI, width 680px and minimum height 100vh.
Used By: /user-registration.php and root /index.php
*/
/* Brand Variables and Reset Start */

/*
Responsive Contract:
- Base: 0px–479px
- Large Mobile: min-width 480px
- Tablet: min-width 768px
- Laptop / Small Desktop: min-width 1024px
- Desktop: min-width 1280px
- Wide Desktop: min-width 1440px
- Print stays isolated from device breakpoints.
*/

@layer rm_user_public_user_registration {
    @layer foundation, responsive, print;

    @layer foundation {
        :root {
            --rm-blue: #090674;
            --rm-pink: #f5005d;
            --rm-ink: #172033;
            --rm-muted: #64748b;
            --rm-success: #15803d;
            --rm-danger: #c81e3f;
        }

        * {
            box-sizing: border-box;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            min-width: 320px;
            margin: 0;
            background: linear-gradient(135deg, #f1f4fb 0%, #eef2f9 52%, #fff5f9 100%);
            color: var(--rm-ink);
            font-family: Arial, Helvetica, sans-serif;
        }

        button,
        input,
        select,
        textarea {
            font: inherit;
        }

        a {
            color: inherit;
            text-decoration: none;
        }

        .public-user-registration-page {
            min-height: 100vh;
            min-height: 100dvh;
        }

        .public-user-registration-layout {
            width: 100%;
            min-height: 100vh;
            min-height: 100dvh;
            padding: 32px 16px 42px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .public-user-registration-stage {
            width: min(100%, 680px);
        }

        .user-registration-form {
            overflow: hidden;
            border: 1px solid #cfd8e5;
            border-radius: 4px 4px 0 0;
            background: #ffffff;
            box-shadow: 0 16px 36px rgba(15, 23, 42, 0.10);
        }

        .user-registration-paper-header {
            padding: 18px 24px 20px;
            border-top: 5px solid var(--rm-pink);
            border-bottom: 2px solid var(--rm-blue);
            background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
        }

        .user-registration-logo-banner {
            padding: 10px 16px 14px;
            display: flex;
            justify-content: center;
            align-items: center;
            /* border: 1px solid #dbe4f2;
            border-radius: 4px;
            background: #ffffff;
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65); */
        }

        .user-registration-logo-banner img {
            width: 100%;
            max-width: 160px;
            height: auto;
            display: block;
            object-fit: contain;
        }

        .user-registration-paper-title {
            margin-top: 5px;
            min-width: 0;
            text-align: center;
        }

        .user-registration-paper-title p {
            margin: 0 0 5px;
            color: var(--rm-blue);
            font-size: clamp(10px, 1.6vw, 12px);
            font-weight: 800;
            letter-spacing: 0.9px;
        }

        .user-registration-paper-title h1 {
            margin: 0;
            color: var(--rm-ink);
            font-size: clamp(16px, 2.4vw, 22px);
            line-height: 1.25;
        }

        .user-registration-paper-title span {
            display: block;
            margin-top: 7px;
            color: var(--rm-muted);
            font-size: 12px;
        }

        .user-registration-rule-note {
            margin: 20px 24px 0;
            padding: 11px 13px;
            display: flex;
            align-items: flex-start;
            gap: 9px;
            border: 1px solid #dbe4f2;
            border-left: 3px solid var(--rm-blue);
            background: #f8fafc;
            color: #475569;
            font-size: 11px;
            line-height: 1.55;
        }

        .user-registration-rule-note i {
            margin-top: 2px;
            color: var(--rm-blue);
        }

        .user-registration-rule-note b,
        .user-required-mark {
            color: var(--rm-pink);
        }

        /* Batch 383 localhost-only inline autocomplete suggestions. */
        .user-registration-test-suggestion-host {
            position: relative;
        }

        .user-registration-test-suggestions {
            position: absolute;
            z-index: 80;
            top: calc(100% - 1px);
            left: 0;
            width: 100%;
            max-height: 176px;
            overflow-y: auto;
            border: 1px solid #cbd5e1;
            border-radius: 7px;
            background: #fff;
            box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
        }

        .user-registration-test-suggestions[hidden] {
            display: none;
        }

        .user-registration-test-suggestion {
            width: 100%;
            min-height: 34px;
            padding: 7px 10px;
            border: 0;
            border-bottom: 1px solid #eef2f6;
            background: #fff;
            color: #263650;
            text-align: left;
            font: inherit;
            font-size: 11px;
            line-height: 1.35;
            cursor: pointer;
            overflow-wrap: anywhere;
        }

        .user-registration-test-suggestion:last-child {
            border-bottom: 0;
        }

        .user-registration-test-suggestion:hover,
        .user-registration-test-suggestion:focus-visible {
            background: #f5f7fb;
            color: var(--rm-blue);
            outline: none;
        }

        .user-registration-message {
            display: none;
            margin: 16px 24px 0;
            padding: 12px 13px;
            border-radius: 3px;
            font-size: 12px;
            font-weight: 600;
            line-height: 1.5;
        }

        .user-registration-message.show {
            display: flex;
            align-items: flex-start;
            gap: 9px;
        }

        .user-registration-message.success {
            border: 1px solid #b7ebc7;
            background: #effcf2;
            color: #176b36;
        }

        .user-registration-message.error {
            border: 1px solid #ffc7d8;
            background: #fff6f8;
            color: #b4234f;
        }

        .user-registration-form-body {
            padding: 20px 24px 6px;
        }

        .user-registration-section {
            padding: 0 0 24px;
            margin-bottom: 23px;
            border-bottom: 1px solid #dbe3ee;
        }

        .user-registration-section:last-child {
            margin-bottom: 0;
            border-bottom: 0;
        }

        .user-registration-section-bar {
            margin-bottom: 18px;
            padding: 9px 12px;
            display: flex;
            align-items: center;
            gap: 10px;
            border-left: 4px solid var(--rm-pink);
            background: #f5f7fb;
        }

        .user-registration-section-bar span {
            width: 26px;
            height: 26px;
            display: grid;
            place-items: center;
            border-radius: 50%;
            background: var(--rm-blue);
            color: #ffffff;
            font-size: 14px;
            font-weight: 800;
           
        }

        .user-registration-section-bar h2 {
            color: #22304a;
            font-size: 14px;
            /* letter-spacing: 0.15px; */
             text-transform: uppercase;
        }

        .user-registration-grid {
            display: grid;
            gap: 17px 20px;
        }

        .user-registration-grid-two {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .user-registration-group {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .user-registration-group-full {
            grid-column: 1 / -1;
             display: flex;
            flex-wrap: wrap;
            justify-content: space-between;

        }

        .user-registration-group label,
        .user-placement-fieldset legend {
            color: #334155;
            font-size: 14px;
            font-weight: 700;
        }

        .user-registration-group input,
        .user-registration-group select,
        .user-registration-group textarea {
            width: 100%;
            border: 1px solid #cbd5e1;
            border-radius: 3px;
            outline: none;
            background: #ffffff;
            color: var(--rm-ink);
            font-size: 13px;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .user-registration-group input,
        .user-registration-group select {
            height: 42px;
            padding: 0 11px;
        }

        .user-registration-group textarea {
            min-height: 80px;
            padding: 10px 11px;
            resize: vertical;
        }

        .user-registration-group input::placeholder,
        .user-registration-group textarea::placeholder {
            color: #94a3b8;
        }

        .user-registration-group input:focus,
        .user-registration-group select:focus,
        .user-registration-group textarea:focus {
            border-color: var(--rm-blue);
            box-shadow: 0 0 0 3px rgba(9, 6, 116, 0.10);
        }

        .user-registration-group input[readonly],
        .user-registration-group select:disabled {
            background: #f8fafc;
            color: #64748b;
            cursor: default;
        }

        .user-registration-field-note {
            color: var(--rm-muted);
            font-size: 10.5px;
            line-height: 1.4;
        }

        .user-registration-field-note.validation-error {
            color: var(--rm-danger);
        }

        .user-registration-field-note.validation-success {
            color: var(--rm-success);
        }

        .user-placement-fieldset {
            min-width: 0;
            border: 0;
        }

        .user-placement-fieldset legend {
            margin-bottom: 8px;
        }

        .user-placement-choice-group {
            width: 100%;
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 14px;
        }

        .user-placement-choice {
            display: block;
            cursor: pointer;
        }

        .user-placement-choice input {
            position: absolute;
            opacity: 0;
            pointer-events: none;
        }

        .user-placement-choice span {
            min-height: 52px;
            padding: 0 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 9px;
            border: 1px solid #cbd5e1;
            border-radius: 3px;
            background: #ffffff;
            color: #475569;
            font-size: 14px;
        }

        .user-placement-choice input:checked + span {
            border-color: var(--rm-blue);
            background: #f1f1ff;
            color: var(--rm-blue);
        }

        .user-placement-choice input:focus-visible + span {
            box-shadow: 0 0 0 3px rgba(9, 6, 116, 0.10);
        }

        .user-pincode-field-wrap,
        .user-password-field-wrap {
            position: relative;
        }

        .user-pincode-field-wrap input,
        .user-password-field-wrap input {
            padding-right: 44px;
        }

        .user-pincode-loader {
            width: 35px;
            height: 42px;
            display: none;
            place-items: center;
            position: absolute;
            top: 0;
            right: 0;
            color: var(--rm-blue);
            font-size: 13px;
        }

        .user-pincode-loader.show {
            display: grid;
        }

        .user-pincode-loader.show i {
            animation: user-register-spin 0.85s linear infinite;
        }

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

        .user-password-toggle {
            width: 42px;
            height: 42px;
            display: grid;
            place-items: center;
            position: absolute;
            top: 0;
            right: 0;
            border: 0;
            background: transparent;
            color: var(--rm-muted);
            cursor: pointer;
        }

        .user-password-toggle:hover {
            color: var(--rm-blue);
        }

        .user-registration-paper-footer {
            padding: 17px 24px;
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 18px;
            flex-direction: column;
            border-top: 1px solid #cfd8e5;
            background: #f8fafc;
        }

        .user-registration-agreements-wrap {
            flex: 1 1 auto;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .user-registration-agreement {
            max-width: 560px;
            display: flex;
            align-items: flex-start;
            gap: 9px;
            color: #475569;
            font-size: 11px;
            line-height: 1.5;
            cursor: pointer;
        }

        .user-registration-agreement input {
            width: 16px;
            height: 16px;
            flex: 0 0 auto;
            margin-top: 1px;
            accent-color: var(--rm-blue);
        }

        .user-registration-action-buttons {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            gap: 10px;
            width: 100%;

        }

        .user-registration-button {
            min-height: 40px;
            padding: 0 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            border: 1px solid transparent;
            border-radius: 3px;
            font-size: 12px;
            font-weight: 800;
            cursor: pointer;
            width: 48%;
            transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .user-registration-button-secondary {
            border-color: #cbd5e1;
            background: #ffa806;
            color: #00050c;
        }

        .user-registration-button-secondary:hover {
            border-color: var(--rm-blue);
            color: var(--rm-blue);
            background-color: #ee0028;
            color: #ffffff;
        }

        .user-registration-button-primary {
            border-color: var(--rm-blue);
            background: var(--rm-blue);
            color: #ffffff;
        }

        .user-registration-button-primary:hover {
            box-shadow: 0 8px 16px rgba(9, 6, 116, 0.20);
             background-color: #016c38;
        }

        .user-registration-bottom-login {
            padding: 16px 24px 22px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 9px;
            border: 1px solid #cfd8e5;
            border-top: 0;
            border-radius: 0 0 4px 4px;
            background: #ffffff;
            box-shadow: 0 16px 36px rgba(15, 23, 42, 0.10);
        }

        .user-registration-bottom-login span {
            color: var(--rm-muted);
            font-size: 12px;
        }

        .user-registration-bottom-login-button {
            min-height: 42px;
            padding: 0 100px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            border: 1px solid var(--rm-blue);
            border-radius: 4px;
            background: #037b1b;
            color: var(--rm-blue);
            color: #ffffff;
            font-size: 13px;
            font-weight: 800;
            transition: background 0.2s ease, color 0.2s ease;
        }

        .user-registration-bottom-login-button:hover {
            background: var(--rm-blue);
            color: #ffffff;
        }

        .public-user-registration-stage .user-registration-logo-banner {
            padding: 8px 12px 10px;
        }

    }

    @layer responsive {
        /* Base: Small Mobile (0px–479px) */
        .user-registration-paper-header {
                padding: 16px;
            }
         .user-registration-logo-banner {
                padding: 8px 10px 10px;
            }

           
            .user-registration-paper-title {
                margin-top: 13px;
            }

            .user-registration-rule-note,
            .user-registration-message {
                margin-left: 17px;
                margin-right: 17px;
            }

            .user-registration-form-body {
                padding: 18px 17px 2px;
            }

            .user-registration-paper-footer {
                padding: 16px 17px;
                align-items: stretch;
                flex-direction: column;
            }

            .user-registration-bottom-login {
                padding: 16px 17px 20px;
            }

            .user-registration-grid-two {
                grid-template-columns: 1fr;
            }

            .user-registration-action-buttons
            {
                width: 100%;
                display: flex;
                justify-content: space-between;
            }

             .user-registration-button{
                width: 100%;
             }

            .user-registration-button {
                flex: 1 1 auto;
            }

        .user-placement-choice-group {
                grid-template-columns: 1fr;
            }

        .public-user-registration-layout {
                padding: 18px 12px 30px;
            }

            .public-user-registration-stage .user-registration-grid-two {
                grid-template-columns: 1fr;
            }

            .public-user-registration-stage .user-registration-paper-header,
            .public-user-registration-stage .user-registration-form-body,
            .public-user-registration-stage .user-registration-paper-footer,
            .public-user-registration-stage .user-registration-bottom-login {
                padding-left: 16px;
                padding-right: 16px;
            }

            .public-user-registration-stage .user-registration-rule-note,
            .public-user-registration-stage .user-registration-message {
                margin-left: 16px;
                margin-right: 16px;
            }

        /* Large Mobile (480px and above) */
        @media (min-width: 480px) {
            .user-placement-choice-group {
                grid-template-columns: revert-layer;
            }

            .user-registration-paper-header {
                    padding: 16px;
                }
             .user-registration-logo-banner {
                    padding: 8px 10px 10px;
                }

               
                .user-registration-paper-title {
                    margin-top: 13px;
                }

                .user-registration-rule-note,
                .user-registration-message {
                    margin-left: 17px;
                    margin-right: 17px;
                }

                .user-registration-form-body {
                    padding: 18px 17px 2px;
                }

                .user-registration-paper-footer {
                    padding: 16px 17px;
                    align-items: stretch;
                    flex-direction: column;
                }

                .user-registration-bottom-login {
                    padding: 16px 17px 20px;
                }

                .user-registration-grid-two {
                    grid-template-columns: 1fr;
                }

                .user-registration-action-buttons
                {
                    width: 100%;
                    display: flex;
                    justify-content: space-between;
                }

                 .user-registration-button{
                    width: 100%;
                 }

                .user-registration-button {
                    flex: 1 1 auto;
                }

            .public-user-registration-layout {
                    padding: 18px 12px 30px;
                }

                .public-user-registration-stage .user-registration-grid-two {
                    grid-template-columns: 1fr;
                }

                .public-user-registration-stage .user-registration-paper-header,
                .public-user-registration-stage .user-registration-form-body,
                .public-user-registration-stage .user-registration-paper-footer,
                .public-user-registration-stage .user-registration-bottom-login {
                    padding-left: 16px;
                    padding-right: 16px;
                }

                .public-user-registration-stage .user-registration-rule-note,
                .public-user-registration-stage .user-registration-message {
                    margin-left: 16px;
                    margin-right: 16px;
                }
        }

        /* Tablet (768px and above) */
        @media (min-width: 768px) {
            .user-registration-paper-header {
                padding: revert-layer;
            }

            .user-registration-logo-banner {
                padding: revert-layer;
            }

            .user-registration-paper-title {
                margin-top: revert-layer;
            }

            .user-registration-rule-note,
                .user-registration-message {
                margin-left: revert-layer;
                margin-right: revert-layer;
            }

            .user-registration-form-body {
                padding: revert-layer;
            }

            .user-registration-paper-footer {
                align-items: revert-layer;
                flex-direction: revert-layer;
                padding: revert-layer;
            }

            .user-registration-bottom-login {
                padding: revert-layer;
            }

            .user-registration-grid-two {
                grid-template-columns: revert-layer;
            }

            .user-registration-action-buttons {
                display: revert-layer;
                justify-content: revert-layer;
                width: revert-layer;
            }

            .user-registration-button {
                width: revert-layer;
                flex: revert-layer;
            }

            .public-user-registration-layout {
                padding: revert-layer;
            }

            .public-user-registration-stage .user-registration-grid-two {
                grid-template-columns: revert-layer;
            }

            .public-user-registration-stage .user-registration-paper-header,
                .public-user-registration-stage .user-registration-form-body,
                .public-user-registration-stage .user-registration-paper-footer,
                .public-user-registration-stage .user-registration-bottom-login {
                padding-left: revert-layer;
                padding-right: revert-layer;
            }

            .public-user-registration-stage .user-registration-rule-note,
                .public-user-registration-stage .user-registration-message {
                margin-left: revert-layer;
                margin-right: revert-layer;
            }
        }
    }
}
