/* ==========================================================
   RITHCABS
   CUSTOMER PROFILE STYLESHEET

   File:
   assets/css/customer-profile.css
========================================================== */


/* ==========================================================
   ROOT VARIABLES
========================================================== */

:root {
    --profile-navy: #06283D;
    --profile-navy-dark: #041E2E;
    --profile-yellow: #FFB800;
    --profile-yellow-dark: #E9A800;
    --profile-yellow-soft: #FFF6DA;

    --profile-white: #FFFFFF;
    --profile-bg: #F7F9FB;
    --profile-border: #E3EAF0;

    --profile-text: #06283D;
    --profile-muted: #6B8293;
    --profile-placeholder: #9EB0BD;

    --profile-success: #188038;
    --profile-success-bg: #E6F4EA;

    --profile-error: #D32F2F;
    --profile-error-bg: #FDECEC;

    --profile-shadow:
        0 12px 35px rgba(6, 40, 61, 0.07);

    --profile-radius: 18px;
}


/* ==========================================================
   PAGE
========================================================== */

.customer-profile-page {
    width: 100%;
    min-height: calc(100vh - 80px);
    background:
        radial-gradient(circle at top right,
            rgba(255, 184, 0, 0.07),
            transparent 28%),
        #F7F9FB;

    padding: 55px 0 80px;
    font-family: "Inter", sans-serif;
    color: var(--profile-text);
}


/* ==========================================================
   CONTAINER
========================================================== */

.customer-profile-page .container {
    width: calc(100% - 40px);
    max-width: 1420px;
    margin: 0 auto;
}


/* ==========================================================
   PAGE HEADER
========================================================== */

.profile-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    margin-bottom: 32px;
}


/* ==========================================================
   TITLE AREA
========================================================== */

.profile-title-area {
    flex: 1;
    min-width: 0;
}


.profile-title-area h1 {
    margin: 0;

    color: var(--profile-navy);

    font-size: 52px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -2px;
}


.profile-title-area h1 span {
    color: var(--profile-yellow);
}


.profile-title-area p {
    margin: 17px 0 0;

    color: var(--profile-muted);

    font-size: 17px;
    line-height: 1.6;
    font-weight: 400;
}


/* ==========================================================
   PROFILE COMPLETION CARD
========================================================== */

.profile-completion-card {
    width: 340px;
    min-width: 340px;

    display: flex;
    align-items: center;
    gap: 16px;

    padding: 20px 22px;

    background: var(--profile-white);

    border: 1px solid var(--profile-border);
    border-radius: 18px;

    box-shadow:
        0 8px 28px rgba(6, 40, 61, 0.05);
}


.profile-completion-icon {
    width: 54px;
    height: 54px;

    flex: 0 0 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background: var(--profile-yellow-soft);
    color: var(--profile-navy);

    font-size: 22px;
}


.profile-completion-content {
    flex: 1;
    min-width: 0;
}


.profile-completion-content>small {
    display: block;

    margin-bottom: 7px;

    color: #8397A6;

    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 1.1px;
}


.profile-completion-value {
    display: flex;
    align-items: baseline;
    gap: 8px;

    margin-bottom: 10px;
}


.profile-completion-value strong {
    color: var(--profile-navy);

    font-size: 21px;
    line-height: 1;
    font-weight: 800;
}


.profile-completion-value span {
    color: var(--profile-muted);

    font-size: 12px;
    font-weight: 600;
}


/* ==========================================================
   PROFILE PROGRESS
========================================================== */

.profile-progress {
    position: relative;

    width: 100%;
    height: 6px;

    overflow: hidden;

    background: #E5EBEF;
    border-radius: 100px;
}


.profile-progress-bar {
    width: 0;
    height: 100%;

    background: var(--profile-yellow);
    border-radius: 100px;

    transition: width 0.35s ease;
}


/* ==========================================================
   MAIN PROFILE LAYOUT
========================================================== */

.customer-profile-layout {
    display: grid;

    grid-template-columns:
        330px minmax(0, 1fr);

    gap: 26px;

    align-items: start;
}


/* ==========================================================
   LEFT SIDEBAR
========================================================== */

.customer-profile-sidebar {
    overflow: hidden;

    background: var(--profile-white);

    border: 1px solid var(--profile-border);
    border-radius: var(--profile-radius);

    box-shadow: var(--profile-shadow);
}


/* ==========================================================
   CUSTOMER SUMMARY
========================================================== */

.customer-summary {
    padding: 32px 25px 28px;

    text-align: center;

    border-bottom: 1px solid #EDF1F4;
}


.customer-avatar {
    width: 86px;
    height: 86px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 22px;

    background: var(--profile-yellow);
    color: var(--profile-navy);

    border: 5px solid #FFF3CC;
    border-radius: 22px;

    box-shadow:
        0 9px 25px rgba(255, 184, 0, 0.22);

    font-size: 35px;
    line-height: 1;
    font-weight: 800;
}


.customer-summary h3 {
    margin: 0 0 8px;

    color: var(--profile-navy);

    font-size: 19px;
    line-height: 1.3;
    font-weight: 800;

    word-break: break-word;
}


.customer-summary p {
    margin: 0;

    color: var(--profile-muted);

    font-size: 13px;
    line-height: 1.5;
    font-weight: 500;
}


/* ==========================================================
   MOBILE VERIFIED BADGE
========================================================== */

.mobile-verified-badge {
    width: fit-content;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    margin: 15px auto 0;

    padding: 8px 12px;

    background: var(--profile-success-bg);
    color: var(--profile-success);

    border-radius: 50px;

    font-size: 11px;
    line-height: 1;
    font-weight: 700;
}


.mobile-verified-badge i {
    font-size: 12px;
}


/* ==========================================================
   REWARD BALANCE
========================================================== */

.reward-balance-card {
    display: flex;
    align-items: center;
    gap: 13px;

    margin: 22px;

    padding: 15px 16px;

    background: #FFF8E5;

    border: 1px solid #FFD36B;
    border-radius: 14px;
}


.reward-icon {
    width: 43px;
    height: 43px;

    flex: 0 0 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--profile-yellow);
    color: var(--profile-navy);

    border-radius: 11px;

    font-size: 18px;
}


.reward-balance-card small {
    display: block;

    margin-bottom: 5px;

    color: #806821;

    font-size: 9px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.7px;
}


.reward-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
}


.reward-value strong {
    color: var(--profile-navy);

    font-size: 20px;
    line-height: 1;
    font-weight: 800;
}


.reward-value span {
    color: var(--profile-muted);

    font-size: 11px;
    font-weight: 600;
}


/* ==========================================================
   SIDEBAR MENU
========================================================== */

.customer-profile-menu {
    padding: 8px 10px 20px;
}


.customer-profile-menu a {
    min-height: 50px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    margin-bottom: 4px;

    padding: 0 15px;

    color: #536E80;

    border-radius: 12px;

    text-decoration: none;

    font-size: 13px;
    font-weight: 650;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


.customer-profile-menu a:last-child {
    margin-bottom: 0;
}


.customer-profile-menu a>span {
    display: flex;
    align-items: center;
    gap: 13px;
}


.customer-profile-menu a>span i {
    width: 20px;

    color: #91A5B3;

    text-align: center;

    font-size: 16px;
}


.customer-profile-menu a>i {
    color: #B3C0C9;

    font-size: 12px;
}


.customer-profile-menu a:hover {
    background: #F5F8FA;
    color: var(--profile-navy);
}


.customer-profile-menu a:hover>span i {
    color: var(--profile-yellow);
}


.customer-profile-menu a.active {
    background: #FFF4D4;
    color: var(--profile-navy);

    font-weight: 750;
}


.customer-profile-menu a.active>span i {
    color: var(--profile-yellow);
}


/* ==========================================================
   RIGHT PROFILE CONTENT
========================================================== */

.customer-profile-content {
    overflow: hidden;

    background: var(--profile-white);

    border: 1px solid var(--profile-border);
    border-radius: var(--profile-radius);

    box-shadow: var(--profile-shadow);
}


/* ==========================================================
   PROFILE CARD HEADER
========================================================== */

.profile-card-header {
    min-height: 86px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 18px 24px;

    border-bottom: 1px solid #EDF1F4;
}


.profile-card-heading {
    display: flex;
    align-items: center;
    gap: 14px;
}


.profile-card-icon {
    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--profile-yellow-soft);
    color: var(--profile-navy);

    border-radius: 13px;

    font-size: 19px;
}


.profile-card-heading h3 {
    margin: 0 0 4px;

    color: var(--profile-navy);

    font-size: 17px;
    line-height: 1.3;
    font-weight: 800;
}


.profile-card-heading p {
    margin: 0;

    color: var(--profile-muted);

    font-size: 12px;
    line-height: 1.4;
}


/* ==========================================================
   EDIT PROFILE BUTTON
========================================================== */

.profile-edit-btn {
    height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 0 17px;

    background: #FFF9E9;
    color: var(--profile-navy);

    border: 1px solid var(--profile-yellow);
    border-radius: 11px;

    outline: none;

    cursor: pointer;

    font-family: "Inter", sans-serif;
    font-size: 12px;
    line-height: 1;
    font-weight: 750;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.profile-edit-btn i {
    color: var(--profile-yellow-dark);
    font-size: 13px;
}


.profile-edit-btn:hover {
    background: var(--profile-yellow);

    box-shadow:
        0 6px 16px rgba(255, 184, 0, 0.18);

    transform: translateY(-1px);
}


.profile-edit-btn:hover i {
    color: var(--profile-navy);
}


.profile-edit-btn:active {
    transform: translateY(0);
}


/* ==========================================================
   MESSAGE AREA
========================================================== */

.profile-message {
    margin: 18px 24px 0;

    padding: 13px 15px;

    border-radius: 10px;

    font-size: 12px;
    line-height: 1.5;
    font-weight: 650;
}


.profile-message.success,
.profile-message.profile-success {
    background: var(--profile-success-bg);
    color: var(--profile-success);

    border: 1px solid #B8DFC3;
}


.profile-message.error,
.profile-message.profile-error {
    background: var(--profile-error-bg);
    color: var(--profile-error);

    border: 1px solid #F3C0C0;
}


/* ==========================================================
   PROFILE FORM
========================================================== */

#customerProfileForm {
    width: 100%;

    padding: 25px 24px 28px;
}


/* ==========================================================
   FORM GRID
========================================================== */

.profile-form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    column-gap: 22px;
    row-gap: 22px;
}


/* ==========================================================
   FORM GROUP
========================================================== */

.profile-form-group {
    min-width: 0;
}


.profile-form-group label {
    display: block;

    margin-bottom: 9px;

    color: var(--profile-navy);

    font-size: 11px;
    line-height: 1.3;
    font-weight: 750;
}


.profile-form-group label span {
    color: #E53935;
}


/* ==========================================================
   INPUT WRAPPER
========================================================== */

.profile-input-wrap {
    position: relative;

    width: 100%;
}


/* ==========================================================
   LEFT INPUT ICON
========================================================== */

.profile-input-wrap>i:first-child {
    position: absolute;

    left: 16px;
    top: 50%;

    z-index: 2;

    transform: translateY(-50%);

    color: #9BAFBC;

    font-size: 15px;

    pointer-events: none;
}


/* ==========================================================
   INPUT / SELECT
========================================================== */

.profile-input-wrap input,
.profile-input-wrap select {
    width: 100%;
    height: 52px;

    padding:
        0 42px 0 47px;

    background: #FFFFFF;
    color: var(--profile-navy);

    border: 1px solid #D9E3E9;
    border-radius: 11px;

    outline: none;

    font-family: "Inter", sans-serif;
    font-size: 13px;
    line-height: 1;
    font-weight: 550;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


/* ==========================================================
   SELECT
========================================================== */

.profile-input-wrap select {
    appearance: auto;
    cursor: pointer;
}


/* ==========================================================
   PLACEHOLDER
========================================================== */

.profile-input-wrap input::placeholder,
.profile-input-wrap textarea::placeholder {
    color: var(--profile-placeholder);
    opacity: 1;
}


/* ==========================================================
   INPUT FOCUS
========================================================== */

.profile-input-wrap input:focus,
.profile-input-wrap select:focus,
.profile-input-wrap textarea:focus {
    background: #FFFFFF;

    border-color: var(--profile-yellow);

    box-shadow:
        0 0 0 3px rgba(255, 184, 0, 0.12);
}


/* ==========================================================
   DISABLED INPUT

   Important:
   Keeps profile readable while Edit mode is OFF.
========================================================== */

.profile-input-wrap input:disabled,
.profile-input-wrap select:disabled,
.profile-input-wrap textarea:disabled {
    background: #F8FAFB;
    color: #476478;

    border-color: #DCE5EA;

    cursor: default;

    opacity: 1;

    -webkit-text-fill-color: #476478;
}


/* ==========================================================
   READONLY
========================================================== */

.profile-input-wrap input[readonly] {
    background: #F8FAFB;
}


/* ==========================================================
   MOBILE VERIFIED INPUT
========================================================== */

.mobile-readonly input {
    padding-right: 45px;
}


.profile-input-wrap .mobile-check {
    position: absolute;

    right: 16px;
    top: 50%;

    transform: translateY(-50%);

    color: var(--profile-success);

    font-size: 16px;
}


/* ==========================================================
   HELP TEXT
========================================================== */

.profile-help-text {
    display: block;

    margin-top: 7px;

    color: #8397A6;

    font-size: 10px;
    line-height: 1.4;
}


/* ==========================================================
   TEXTAREA / ADDRESS
========================================================== */

.profile-address-group {
    grid-column: 1 / -1;
}


.profile-textarea-wrap>i:first-child {
    top: 17px;

    transform: none;
}


.profile-input-wrap textarea {
    width: 100%;
    min-height: 105px;

    display: block;

    padding:
        15px 16px 15px 47px;

    resize: vertical;

    background: #FFFFFF;
    color: var(--profile-navy);

    border: 1px solid #D9E3E9;
    border-radius: 11px;

    outline: none;

    font-family: "Inter", sans-serif;
    font-size: 13px;
    line-height: 1.6;
    font-weight: 500;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


/* ==========================================================
   FORM ACTIONS
========================================================== */

.profile-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;

    margin-top: 28px;
    padding-top: 22px;

    border-top: 1px solid #EDF1F4;
}


/* ==========================================================
   CANCEL BUTTON
========================================================== */

.profile-cancel-btn {
    min-width: 105px;
    height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    padding: 0 17px;

    background: #FFFFFF;
    color: #526B7C;

    border: 1px solid #D5E0E6;
    border-radius: 10px;

    outline: none;

    cursor: pointer;

    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 700;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}


.profile-cancel-btn:hover {
    background: #F5F8FA;
    border-color: #C4D0D7;
}


/* ==========================================================
   SAVE BUTTON
========================================================== */

.profile-save-btn {
    min-width: 145px;
    height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 0 20px;

    background: var(--profile-yellow);
    color: var(--profile-navy);

    border: 1px solid var(--profile-yellow);
    border-radius: 10px;

    outline: none;

    cursor: pointer;

    font-family: "Inter", sans-serif;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;

    box-shadow:
        0 7px 18px rgba(255, 184, 0, 0.18);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.profile-save-btn:hover {
    background: var(--profile-yellow-dark);

    box-shadow:
        0 9px 22px rgba(255, 184, 0, 0.25);

    transform: translateY(-1px);
}


.profile-save-btn:active {
    transform: translateY(0);
}


.profile-save-btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;

    transform: none;
}


/* ==========================================================
   BOOTSTRAP SPINNER FALLBACK
========================================================== */

.spinner-border {
    display: inline-block;

    width: 1rem;
    height: 1rem;

    vertical-align: -0.125em;

    border: 0.15em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;

    animation:
        profile-spinner 0.75s linear infinite;
}


.spinner-border-sm {
    width: 0.85rem;
    height: 0.85rem;

    border-width: 0.12em;
}


@keyframes profile-spinner {

    to {
        transform: rotate(360deg);
    }

}


/* ==========================================================
   ACCOUNT SUMMARY
========================================================== */

.profile-account-summary {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 1px;

    margin: 0 24px 28px;

    overflow: hidden;

    background: #E7EDF1;

    border: 1px solid #E7EDF1;
    border-radius: 12px;
}


.profile-account-summary>div {
    padding: 16px 18px;

    background: #F9FBFC;
}


.profile-account-summary small {
    display: block;

    margin-bottom: 5px;

    color: var(--profile-muted);

    font-size: 10px;
    line-height: 1.3;
    font-weight: 650;
}


.profile-account-summary strong {
    color: var(--profile-navy);

    font-size: 15px;
    line-height: 1.3;
    font-weight: 800;
}


/* ==========================================================
   DATE INPUT
========================================================== */

.profile-input-wrap input[type="date"] {
    position: relative;
}


.profile-input-wrap input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}


/* ==========================================================
   AUTOFILL FIX
========================================================== */

.profile-input-wrap input:-webkit-autofill,
.profile-input-wrap input:-webkit-autofill:hover,
.profile-input-wrap input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--profile-navy);

    transition:
        background-color 5000s ease-in-out 0s;
}


/* ==========================================================
   EDIT MODE OPTIONAL STATE

   customer-profile.js can add .profile-editing
   to .customer-profile-content.
========================================================== */

.customer-profile-content.profile-editing .profile-input-wrap input:not(:disabled),

.customer-profile-content.profile-editing .profile-input-wrap select:not(:disabled),

.customer-profile-content.profile-editing .profile-input-wrap textarea:not(:disabled) {

    background: #FFFFFF;
}


/* ==========================================================
   TABLET
   <= 1100px
========================================================== */

@media (max-width: 1100px) {

    .customer-profile-page {
        padding-top: 40px;
    }


    .profile-title-area h1 {
        font-size: 44px;
    }


    .customer-profile-layout {
        grid-template-columns:
            285px minmax(0, 1fr);

        gap: 20px;
    }


    .profile-completion-card {
        width: 310px;
        min-width: 310px;
    }


    .profile-form-grid {
        column-gap: 18px;
    }

}


/* ==========================================================
   TABLET
   <= 900px
========================================================== */

@media (max-width: 900px) {

    .profile-page-header {
        align-items: flex-start;
        flex-direction: column;
    }


    .profile-completion-card {
        width: 100%;
        min-width: 0;
    }


    .customer-profile-layout {
        grid-template-columns: 1fr;
    }


    .customer-profile-sidebar {
        width: 100%;
    }


    .customer-summary {
        padding-bottom: 22px;
    }


    .reward-balance-card {
        max-width: 330px;

        margin-left: auto;
        margin-right: auto;
    }


    .customer-profile-menu {
        display: grid;

        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 6px;

        padding: 10px 15px 18px;
    }


    .customer-profile-menu a {
        margin: 0;

        padding: 0 12px;
    }


    .customer-profile-menu a>i {
        display: none;
    }

}


/* ==========================================================
   MOBILE
   <= 700px
========================================================== */

@media (max-width: 700px) {

    .customer-profile-page {
        padding:
            28px 0 55px;
    }


    .customer-profile-page .container {
        width: calc(100% - 24px);
    }


    .profile-page-header {
        gap: 22px;

        margin-bottom: 22px;
    }


    .profile-title-area h1 {
        font-size: 38px;
        letter-spacing: -1.3px;
    }


    .profile-title-area p {
        margin-top: 11px;

        font-size: 14px;
    }


    .profile-completion-card {
        padding: 17px;
    }


    .customer-profile-layout {
        gap: 18px;
    }


    .profile-card-header {
        min-height: auto;

        align-items: flex-start;

        padding: 17px;
    }


    .profile-card-heading {
        align-items: flex-start;
    }


    .profile-card-icon {
        width: 43px;
        height: 43px;

        flex-basis: 43px;
    }


    .profile-edit-btn {
        min-width: 43px;
        width: 43px;

        padding: 0;
    }


    .profile-edit-btn span {
        display: none;
    }


    #customerProfileForm {
        padding:
            21px 17px 24px;
    }


    .profile-form-grid {
        grid-template-columns: 1fr;

        row-gap: 19px;
    }


    .profile-address-group {
        grid-column: auto;
    }


    .profile-message {
        margin:
            16px 17px 0;
    }


    .profile-account-summary {
        margin:
            0 17px 24px;
    }

}


/* ==========================================================
   SMALL MOBILE
   <= 520px
========================================================== */

@media (max-width: 520px) {

    .profile-title-area h1 {
        font-size: 34px;
    }


    .profile-completion-icon {
        width: 48px;
        height: 48px;

        flex-basis: 48px;
    }


    .customer-avatar {
        width: 78px;
        height: 78px;

        font-size: 31px;
    }


    .customer-profile-menu {
        grid-template-columns: 1fr;
    }


    .customer-profile-menu a>i {
        display: block;
    }


    .profile-card-heading h3 {
        font-size: 15px;
    }


    .profile-card-heading p {
        font-size: 11px;
    }


    .profile-input-wrap input,
    .profile-input-wrap select {
        height: 50px;
    }


    .profile-form-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }


    .profile-cancel-btn,
    .profile-save-btn {
        width: 100%;
        min-width: 0;
    }


    .profile-account-summary {
        grid-template-columns: 1fr;
    }

}


/* ==========================================================
   VERY SMALL MOBILE
   <= 380px
========================================================== */

@media (max-width: 380px) {

    .customer-profile-page .container {
        width: calc(100% - 18px);
    }


    .profile-title-area h1 {
        font-size: 31px;
    }


    .profile-completion-card {
        gap: 12px;
    }


    .customer-summary {
        padding-left: 18px;
        padding-right: 18px;
    }


    .reward-balance-card {
        margin-left: 14px;
        margin-right: 14px;
    }


    .profile-card-header {
        gap: 10px;
    }


    .profile-card-icon {
        width: 40px;
        height: 40px;

        flex-basis: 40px;
    }


    #customerProfileForm {
        padding-left: 14px;
        padding-right: 14px;
    }


    .profile-message {
        margin-left: 14px;
        margin-right: 14px;
    }


    .profile-account-summary {
        margin-left: 14px;
        margin-right: 14px;
    }

}