.shipping-and-payment-wrapper {
    background-color: #F2EFEA;
}

.shipping-and-payment {
    max-width: 1078px;
    margin: 0 auto;
    width: 100%;
    background-color: #FFFFFF;
    border-radius: 15px;
    padding: 30px 16px;
}

/* SHIPPING INFO */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

/* .form-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
} */

.shipping-title {
    font-weight: 700;
    font-size: 28px;
    line-height: 36px;
    letter-spacing: -0.2px;
    margin-bottom: 10px;
    color: #033737;
}

.header-text {
    font-weight: 450;
    font-size: 18px;
    line-height: 21px;
    color: #2A2724;
    margin-bottom: 30px;
}

.address-section {
    display: flex;
    flex-direction: column;
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-row:not(:last-child) {
    margin-bottom: 16px;
}

.input-field {
    flex: 1;
    padding: 14px 19px;
    border: 1px solid #033737;
    border-radius: 5px;
    color: #033737;
    font-family: var(--font-primary);
    font-weight: 450;
    font-size: 16px;
    line-height: 24px;
    height: 55px;
    align-items: center;
    width: 100%;
}

/* Custom Select */
.custom-select-wrapper {
    position: relative;
    width: 43%;
    min-width: 180px;
}

.custom-select {
    position: relative;
    border: 1px solid #033737;
    border-radius: 5px;
    height: 55px;
    cursor: pointer;
    background-color: #fff;
    padding: 26px 16px 8px 16px;
    font-family: var(--font-primary);
    font-weight: 450;
    font-size: 16px;
    line-height: 24px;
    align-items: center;
}

.custom-select .selected-option {
    display: flex;
    align-items: center;
    font-family: var(--font-primary);
    font-weight: 450;
    font-size: 16px;
    line-height: 24px;
    color: #033737;
}

.custom-select .flag-icon {
    width: 20px;
    height: auto;
    margin-right: 8px;
}

.custom-select .options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #033737;
    border-radius: 5px;
    background-color: #fff;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.custom-select .options li {
    padding: 10px;
    cursor: pointer;
    color: #033737;

}

.custom-select .options li:hover,
.custom-select .options li.selected {
    background-color: #F9F9F9;
}

.custom-select .options li span {
    vertical-align: middle;
}

.custom-select.open .options {
    display: block;
}

.custom-select::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 38px;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-image: url('https://img.libidion.com/arrow-down.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Adjust input-field for labels */

.custom-select,
.input-phone {
    position: relative;
}

.input-phone::before,
.custom-select::before {
    content: attr(data-label);
    position: absolute;
    left: 16px;
    top: 7px;
    font-family: var(--font-primary);
    font-weight: 450;
    font-size: 12px;
    line-height: 120%;
    pointer-events: none;
    z-index: 1000;
    color: #033737;
}

.input-phone {
    position: relative;
    flex: 1;
    /* min-width: 180px; */
}

.phone-container {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    border: 1px solid #033737;
    border-radius: 5px;
    background-color: #fff;
    height: 55px;
}

.phone-prefix {
    padding: 27px 8px 7px 16px;
    font-family: var(--font-primary);
    font-weight: 450;
    font-size: 16px;
    line-height: 24px;
    white-space: nowrap;
    color: #033737;
}

.input-phone .input-field {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 27px 16px 8px 0;
    font-family: var(--font-primary);
    font-weight: 450;
    font-size: 16px;
    line-height: 24px;
    color: #033737;
}

.phone-container:focus-within {
    border: 1px solid #033737;
}

/* Стилі для плейсхолдера */
.input-phone .input-field::placeholder {
    color: #9CA3AF;
}

.input-field--full {
    flex: 1;
    width: 100%;
}

/* Payment method */

.payment-section {
    display: flex;
    flex-direction: column;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.payment-method {
    background-color: #FFFFFF;
    border-radius: 5px;
    border: 1px solid #033737;
    padding: 15px;
}

.payment-header {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
}

.payment-header input[type="radio"] {
    width: 22px;
    height: 22px;
}

.payment-title {
    flex: 1;
    font-weight: 450;
    font-size: 17px;
    line-height: 27px;
    color: #292929;
}

.payment-icon-cards {
    max-height: 24px;
    width: auto;
}

.payment-icon-klarna {
    max-height: 27px;
    width: auto;
}

.payment-icon-paypal {
    max-height: 22px;
    width: auto;
}

.payment-details {
    display: none;
}

.payment-method.active .payment-details {
    display: block;
    margin-top: 16px;
}

.payment-method-cards.active .payment-details {
    padding-top: 44px;
    border-top: 1px solid #E3E3E3;
}

.input-wrapper {
    position: relative;
    flex: 1;
}

.input-field.error {
    border-color: red;
}

.error-message {
    display: none;
    color: red;
    font-family: var(--font-primary);
    font-size: 14px;
    margin-top: 5px;
}

.input-credit-card {
    margin-bottom: 15px;
}

.input-label {
    position: absolute;
    top: -30px;
    font-weight: 450;
    font-size: 15px;
    line-height: 25px;
    color: #033737;
}

.continue-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 24px;
    background-color: #F6887B;
    color: #FFFFFF;
    border: none;
    border-radius: 100px;

    font-family: var(--font-primary);
    font-weight: 450;
    font-size: 18px;
    line-height: 100%;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.continue-button:hover {
    background-color: #E06A5F;
}

.button-icon {
    width: 20px;
    height: 20px;
}

.refund-element {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 10px;
    margin-top: 13px;
}

.refund-element-text {
    font-weight: 450;
    font-size: 16px;
    line-height: 25px;
    text-align: center;
    color: #214F4F;
}

.refund-element-img {
    width: 20px;
    height: auto;
}

.payment-method-info {
    font-weight: 450;
    font-size: 15px;
    line-height: 18px;
    color: #012218;
    margin-top: 16px;
}

.klarna-button {
    background-color: #ffb3c7;
    width: 100%;
    padding: 12px 24px;
    color: #012218;
    border: none;
    border-radius: 100px;

    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 18px;
    line-height: 100%;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.klarna-button:hover {
    background-color: #ffc7d4;
}

/* radiobutton styles */
.payment-method input[type="radio"] {
    accent-color: #000000;
    outline: none;
    box-shadow: none;
}

.payment-method input[type="radio"]:focus {
    outline: none;
}

.payment-method input[type="radio"]:checked {
    background-color: transparent;
}

/* new FEATURES */
.shipping-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    background-color: #F2EFEA;
    border-radius: 8px;
    padding: 16px;
    margin-top: 24px;
}

.car-image {
    width: 24px;
    height: auto;
}

.shipping-text {
    font-family: var(--font-primary);
    font-weight: 450;
    font-size: 16px;
    line-height: 150%;
}

.payment-method__features {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 32px;
}

.rating-wrapper {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.payment-method__features__stars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.payment-method__features-star {
    width: 16px;
    height: auto;
}

.rating-text-payment {
    font-weight: 450;
    font-size: 14px;
    line-height: 20px;
}

.payment-method__features-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
}

.payment-method__feature {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
}

.payment-method__features-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #FFE5E1;
    min-width: 48px;
    min-height: 48px;
    flex-shrink: 0;
}

.payment-method__features-image {
    width: auto;
    height: 25px;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.payment-method__features-text {
    font-weight: 700;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    text-transform: uppercase;
}

@media (max-width: 470px) {

    .form-row {
        flex-wrap: wrap;
    }

    .custom-select-wrapper {
        width: 100%;
    }
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 37px;
  }
}

@media (min-width: 1024px) {

    .shipping-and-payment-wrapper {
        padding-block: 70px;
    }

    .shipping-and-payment {
        padding: 37px 25px 44px 25px;
    }

    /* .form-content {
        grid-template-columns: 1fr;
    } */

    .shipping-title {
        margin-bottom: 15px;
    }

    .form-row {
        gap: 25px;
    }
}