/*======================
  Root Colors / Variables
=======================*/
:root {
    --white: #ffffff;
    --box-gray: #F9F9F9;
    --light-gray: #ddd;
    --gray: #BFBFBF;
    --text-gray: #999999;
    --red: #cb1523;
    --green: #4E9000;
    --border-gray: #E5E5E5;
    --baby-blue: #EEF4FC;
}

/*======================
  Typography / Headings
=======================*/
.account-container {
    max-width: 1200px;
}

.account-container .header {
    text-align: center;
    color: var(--red);
}

.profile-subheading, .account-container [class^="h"] {
    margin-bottom: 15px;
}

.account-container h5 {
    margin-top: 0;
}

.profile-subheading-title {
    color: var(--red);
}

/*======================
  Logo
=======================*/
.logo {
    width: 50px;
    height: 50px;
}

/*======================
  Profile Menu
=======================*/
.menu-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
    margin-bottom: 15px;
}

.menu-list li {
    margin-right: 8px;
}

.menu-list li a {
    display: block;
    padding: 15px 25px;
    margin-top: 20px;
    color: #374151;
    background-color: #e5e7eb;
    border-radius: 4px 4px 0 0;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 200ms ease-in;
}

.menu-list li a:hover {
    background-color: #d1d5db;
    transform: scale3D(1.05, 1, 1.05);
}

.menu-list li a.active {
    background-color: #ffffff;
    border-color: #e5e7eb #e5e7eb #ffffff #e5e7eb;
}

/*======================
  Mobile Menu
=======================*/
.mobile-menu {
    border: 1px solid var(--border-gray);
    border-radius: 3px;
    background: none;
    display: none;
}

/*======================
  Orders Table
=======================*/
.orders-table {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.orders-header {
    display: flex;
    font-weight: bold;
    padding: 10px 15px;
}

.orders-header .col {
    flex: 1;
}

.orders-header-details {
    display: flex;
    font-weight: bold;
    justify-content: space-between;
    padding: 10px 15px;
}

.order-details-products {
    border: 1px solid var(--border-gray);
    border-radius: 0 0 3px 3px;
    padding: 10px 15px;
}

.order-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    white-space: nowrap;
    align-items: center;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.order-row-details {
    display: flex;
    flex-flow: row;
    justify-content: space-between;
    white-space: nowrap;
    align-items: center;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 3px 3px 0 0;
    border-bottom: none;
}

.order-row:nth-child(odd) {
    background-color: var(--box-gray);
}

.order-row .col {
    flex: 1;
}

.order-row .col.id .date {
    display: block;
    color: #888;
    margin-top: 4px;
}

.order-row .col.status span {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
}

.order-row-details .col.status span {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
}

.order-row-details .col.status.completed span,
.order-row-details .col.status.processing span,
.order-row .col.status.completed span,
.order-row .col.status.processing span {
    background-color: #DFF5E1;
    color: var(--green);
}

.order-row-details .col.status.pending span,
.order-row-details .col.status.canceled span,
.order-row .col.status.pending span,
.order-row .col.status.canceled span {
    background-color: #FFE6E6;
}

.order-row .col.actions {
    display: flex;
    gap: 40px;
    justify-content: flex-end;
}

.order-row .col.actions .action {
    display: flex;
    flex-flow: row;
    gap: 10px;
    align-items: center;
    color: #D71921;
    text-decoration: none;
    font-weight: 500;
}

.order-row .col.actions .action:hover {
    text-decoration: underline;
}

.order-row.empty {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    min-height: 500px;
    background-color: #f9f9f914;
}

.order-row.empty a {
    border: 1px solid var(--red);
    background-color: var(--red);
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    color: white;
    gap: 10px;
    text-decoration: none;
    transition: all 200ms ease-in;
}

.order-row.empty a span {
    transition: all 200ms ease-in;
}

.order-row.empty .client-empty-orders-text {
    font-size: 19px;
}

.order-row.empty a:hover span {
    transform: translateX(5px);
}

.order-row .total {
    font-weight: bold;
}

/*======================
  Buttons
=======================*/
.btn-view-all-orders {
    border: 1px solid var(--red);
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    color: #333;
    gap: 10px;
    min-width: 200px;
    margin-top: 10px;
}

.btn-view-all-orders span {
    transition: transform 0.2s ease;
}

.btn-view-all-orders:hover span {
    transform: translateX(5px);
}

hr {
    border-top: 2px dashed #eee;
}

/*======================
  Loyalty Card
=======================*/
.loyal-card-box {
    border: 1px solid var(--border-gray);
    padding: 10px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

.loyal-card-box.big-card {
    padding: 25px;
}

.loyal-card-text {
    font-weight: 400;
    font-size: 18px;
    line-height: 130%;
    text-align: center;
    color: var(--text-gray);
}

.birthday-group {
    display: flex;
    flex-flow: row;
    gap: 5px;
}

/*======================
  Status Dots
=======================*/
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
    vertical-align: middle;
    padding: 0;
}

.status-dot.completed,
.status-dot.processing {
    background-color: var(--green);
}

.status-dot.pending,
.status-dot.canceled {
    background-color: var(--red);
}

/*======================
  Additional Info / Interactions
=======================*/
.additional-info-box {
    border: 1px solid var(--border-gray);
    padding: 15px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background-color: #f9f9f914;
}

.client-additional-interactions {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--red);
    text-decoration: none;
    margin-top: 10px;
}

.client-additional-interactions svg {
    width: 11px;
    height: 18px;
    transition: all 200ms ease-in;
}

.client-additional-interactions:hover svg {
    transform: translateX(5px);
}

.client-additional-interactions .create:hover svg {
    transform: scale(1.2);
}

.client-no-address {
    background-color: transparent;
}

/*======================
  User Edit Form
=======================*/
.user-edit-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    justify-content: space-evenly;
}

.user-edit-form input {
    width: 100%;
    border: 1px solid var(--border-gray);
    border-radius: 5px;
    padding: 10px;
    margin-top: 5px;
}

.client-edit-submit-btn {
    background-color: var(--red);
    border: 1px solid var(--red);
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    color: white;
    gap: 10px;
}

.client-edit-submit-btn:hover {
    background-color: var(--red);
    color: white;
}

/*======================
  User Logout / Delete
=======================*/
.user-edit-logout {
    background: none;
    border: none;
    color: var(--red);
    text-decoration: none;
    display: flex;
    flex-flow: row;
    justify-self: center;
    gap: 10px;
    padding: 20px;
}

.user-edit-logout svg {
    width: 18px;
    height: 19px;
    transition: all 200ms ease-in;
}

.user-edit-logout:hover svg {
    transform: translateX(5px);
}

.user-delete-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    justify-self: center;
    padding: 20px;
    margin-top: 20px;
}

/*======================
  SweetAlert Styles
=======================*/
.swal-popup-large {
    width: 600px !important;
    font-size: 14px;
}

.swal-title-large {
    font-size: 18px !important;
}

.swal-text-large {
    font-size: 16px !important;
}

.swal-btn-large {
    font-size: 16px !important;
    padding: 12px 24px !important;
}

/*======================
    Loyalty card layout
=======================*/
.client-loyal-card-register-form {
    display: flex;
    flex-flow: column;
    gap: 15px;
}

.loyal-card-flex-row {
    display: flex;
    flex-flow: row;
    gap: 10px;
}

.loyal-card-flex-row .form-group {
    width: 100%;
}

.client-is-loyal-text {
    margin: 15px;
}

.client-is-loyal-text.center {
    text-align: center;
}

/*======================
    Form controls unified look
=======================*/
.select2-container--default .select2-selection--single {
    height: 42px !important;
    border: 1px solid #ced4da !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    background-color: #fff !important;
    font-size: 15px;
    line-height: 1.4;
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
}

.form-control:focus,
.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--red);
    box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.2);
    outline: none;
}

/*======================
    Select2 adjustments
=======================*/
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #212529;
    line-height: 26px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    right: 10px;
    top: 0;
}

/*======================
    Checkboxes (for later)
=======================*/
.loyal-card-form-check {
    display: flex;
    flex-flow: row;
    gap: 10px;
    align-items: center;
}

.loyal-card-form-check label {
    font-weight: normal;
}

.loyal-card-form-check label a {
    font-weight: bold;
    color: var(--red);
}

.select2-container--default .select2-selection--single:hover {
    border-color: #999;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 6px;
    right: 10px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #333;
    line-height: normal;
    padding-left: 2px;
}

/* Focus/active states */
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--red);
    box-shadow: 0 0 0 0.25rem rgba(255, 0, 0, 0.25);
}

/* Dropdown styling */
.select2-dropdown {
    border-radius: 8px;
    border: 1px solid #ced4da;
    overflow: hidden;
}

.select2-results__option {
    padding: 8px 12px;
}

.select2-results__option--highlighted {
    background-color: var(--red);
    color: #fff;
}

/* Fit inside your flex layout */
.loyal-card-flex-row .select2-container {
    width: 100% !important;
}

/*======================
  Addresses
=======================*/
.client-address-grid {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.modal-dialog-centered {
    max-width: calc(100vw - 5%);
    margin: 0 auto;
}

.modal-content {
    max-height: 900px;
    overflow: auto;
    margin: 30px;
}

.client-address-template .checkmark, .payment-box .checkmark {
    position: absolute;
    top: -15px;
    left: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: transparent;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s;
}

.modal-body {
    padding: 15px 50px 0 50px;
}

.modal-title {
    color: var(--red);
    font-weight: bold;
}

#modalsDiv .modal-lg {
    width: 1366px;
}

.customer-input-fields input {
    border: 1px solid var(--border-gray);
    border-radius: 3px;
}

.customer-input-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    border-bottom: 1px dashed var(--gray);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.order-form-components h2 {
    color: var(--red);
}

.form-label {
    font-size: 16px;
    font-weight: 500;
}

.field {
    padding: 14px;
    border: 1px solid var(--light-gray);
    background: none;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

.input-group-addon {
    background-color: #f9f9f9;
    border: 1px solid var(--light-gray);
    border-right: none !important;
    border-radius: 5px 0 0 5px;
}

.wide-field .select2-container--default .select2-selection--single {
    border: 1px solid var(--light-gray);
}

.select2-container--default .select2-selection--single {
    border: none;
    background: transparent;
}

.input-group-with-phone-code .field {
    border-left: none;
    border-radius: 0 5px 5px 0;
}

.form-row-inline {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.form-row-inline .field {
    flex: 1;
}

.field:focus {
    outline: none;

}

#neighbourhoodBlock {
    display: none;
}

.modal-dialog-centered {
    max-width: calc(100vw - 5%);
    margin: 0 auto;
}

.modal-content {
    max-height: 900px;
    overflow: auto;
    margin: 30px;
}

.payment-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

#create-address,
.client-addresses-slider {
    display: none;
}

.client-primary-address {
    display: flex;
    background: var(--box-gray);
    padding: 15px;
    border-radius: 5px;
    justify-content: space-between;
}

.client-primary-address input {
    display: none;
}

.client-address-template {
    align-content: center;
    position: relative;
    cursor: pointer;
    padding: 20px;
    border: 2px solid var(--gray);
    border-radius: 10px;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    transition: scale 300ms;
    min-height: 170px;
    max-height: 170px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.client-primary-address .client-change-address p {
    color: var(--red);
    transition: scale 300ms;
}

.client-primary-address .client-change-address p:hover {
    scale: 1.03;
    cursor: pointer;
}

.client-addresses-slider {
    margin: 20px 0;
}

.client-address-swap {
    text-align: center;
}

.client-address-slide {
    padding: 5px;
}

.client-addresses-slider .slick-track {
    margin-top: 10px;
}

.client-address-inner {
    font-weight: normal;
    color: black;
}

.client-address-template input,
.payment-box input {
    position: absolute;
    opacity: 0;
}

.client-address-template:hover,
.payment-box:hover {
    border-color: #ccc;
}

.client-address-template:hover {
    scale: 1.02
}

.client-address-template {
    display: block;
}

.client-address-template[data-address-index]:nth-child(n+5) {
    display: none;
}

#create-address {
    text-decoration: none;
    font-size: 16px;
}

#create-address img {
    margin-right: 5px;
}

.block-full-width,
.modal-body .last-row {
    grid-column: span 2;
}

.block-full-width {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;

}

.create-new-address-header {
    display: flex;
    flex-flow: row;
    place-content: space-between;
    padding: 20px 0;
}

.close span {
    font-size: 24px;
    padding-right: 18px;
}

.modal-body {
    padding: 15px 50px 0 50px;
}

.create-new-address-footer {
    display: flex;
    align-content: center;
    padding-top: 15px;
    padding-bottom: 15px;
}

.change-button-style {
    border: none;
    background: none;
}

.cancel-button {
    padding: 20px;
    border: 2px solid var(--red);
    border-radius: 8px;
    transition: scale 250ms;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.confirm-button {
    padding: 20px;
    border: 2px solid var(--red);
    background: var(--red);
    border-radius: 8px;
    color: white;
    transition: scale 250ms;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cancel-button i,
.confirm-button i,
.confirm-button .change-button-style,
.cancel-button .change-button-style {
    font-size: 16px;
    font-weight: bold;
}

.confirm-button:hover,
.cancel-button:hover {
    scale: 1.03;
    cursor: pointer;
}

.modal-title {
    color: var(--red);
    font-weight: bold;
}

#modalsDiv .modal-lg {
    width: 1366px;
}

.create-new-address-block {
    display: flex;
    flex-flow: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#addressModal .input-group {
    width: 100%;
}

#addressModal .wide-field {
    grid-column: span 2;
}

#addressModal .input-group-addon {
    padding: 0 12px;
}

.client-options-address {
    display: flex;
    position: absolute;
    top: 10px;
    right: 10px;
    gap: 5px;
}

.client-address-template .checkmark,
.payment-box .checkmark {
    position: absolute;
    top: -15px;
    left: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: bold;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s, background-color 0.3s, border-color 0.3s;
}

/* Checkmark symbol */
.client-address-template .checkmark::before,
.payment-box .checkmark::before {
    content: "✓";
    font-weight: bold;
    color: white;
}

/* Show checkmark when input is checked */
.client-address-template input:checked ~ .checkmark,
.payment-box input:checked ~ .checkmark {
    visibility: visible;
    opacity: 1;
    background-color: var(--green);
    border-color: var(--green);
}

/* Change border of the container when checked */
.client-address-template:has(input:checked),
.payment-box:has(input:checked) {
    border-color: var(--green);
}

/* Hover effect */
.client-address-template:hover,
.payment-box:hover {
    border-color: #ccc;
    scale: 1.02;
    transition: scale 0.3s;
}

/*======================
  Order Details
=======================*/
.order-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.order-details-header a {
    margin-top: 20px;
}

.product-row {
    display: flex;
    flex-flow: row;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
    padding: 25px;
}

.product-table-image {
    display: flex;
    flex-flow: row;
    gap: 10px;
}

.product-table-image img {
    width: 160px;
    height: auto;
    border: 1px solid var(--border-gray);
}

.product-row-title {
    font-weight: bold;
    text-decoration: none;
}

.product-row .order-total {
    font-weight: bold;
}

.order-details-back-nav {
    color: var(--red);
    text-decoration: none;
}

.order-details-back-nav:hover {
    color: var(--red);
}

.order-details-back-nav img {
    transition: transform 0.2s ease;
}

.order-details-back-nav:hover img {
    transform: translateX(-5px);
}

.floating-cart-container {
    background: rgba(249, 249, 249, 0.89);
    border-radius: 10px;
    padding: 10px;
}

.floating-cart-container div:first-of-type {
    padding-top: 10px;
}

.floating-cart-item {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-pack: justify;
    justify-content: space-between;
    font-size: 16px;
    font-weight: bold;
    padding: 0px 15px 15px 15px;
    align-items: center;
}

/*======================
  Kitchen projects
=======================*/
.kitchen-projects-grouped-dates {
    display: flex;
    flex-flow: column;
    gap: 10px;
}

/*======================
  Responsive
=======================*/
@media screen and (max-width: 991px) {
    .product-row {
        flex-flow: column;
        text-align: right;
    }

    .floating-cart-container {
        padding: 10px 0;
    }

    .floating-cart-container div:first-of-type {
        padding: 10px 0;
    }

    .order-row.empty {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
        min-height: 500px;
        background-color: #f9f9f914;
        font-size: 16px;
        min-width: 300px;
    }

    .order-row.empty .client-empty-orders-text {
        font-size: 16px;
    }

    .client-address-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .customer-input-fields {
        display: flex;
        flex-flow: column;
    }

    .block-full-width {
        grid-template-columns: repeat(1, 1fr);
    }

    .block-full-width .form-label {
        width: 100%;
    }

    .loyal-card-flex-row {
        flex-flow: column;
    }

    .hide-on-mobile {
        display: none;
    }

    .product-row {
        padding: 0;
        margin-bottom: 5px;
    }

    .user-edit-form {
        grid-template-columns: repeat(2, 1fr);
    }

    .menu-list {
        display: none;
    }

    .mobile-menu {
        display: block;
        width: 100%;
        padding: 8px;
    }

    .orders-table .order-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-areas:
            "id id"
            "status total"
            "actions actions";
        gap: 15px;
        margin-bottom: 15px;
        border-bottom: 1px solid #eee;
        padding: 10px;
    }

    .orders-table .order-row .col.id {
        grid-area: id;
        display: flex;
        justify-content: space-between;
    }

    .order-row-details,
    .orders-table .order-row .col.status {
        grid-area: status;
        white-space: nowrap;
        justify-self: start;
    }

    .orders-table .order-row .col.total {
        grid-area: total;
        justify-self: end;
    }

    .orders-table .order-row .col.actions {
        grid-area: actions;
        display: flex;
        justify-content: space-between;
        gap: 5px;
    }

    .orders-table .order-row .col .date {
        color: #666;
        display: block;
        margin-top: 0;
    }

    .orders-header {
        display: none;
    }

    .btn-view-all-orders {
        width: 100%;
        margin-bottom: 15px;
    }
}

@media screen and (min-width: 991px) {
    .menu-list {
        display: flex;
    }

    .mobile-menu {
        display: none;
    }
}

@media screen and (max-width: 767px) {
    .user-edit-form {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media screen and (max-width: 450px) {
    .orders-table {
        width: 100%;
    }

    .orders-table .order-row {
        padding: 10px;
    }
}
