/* For CC fields give space from upwards*/
.wc-block-components-form-credit-card {
    box-sizing: border-box !important;
    width: calc(100% - 12px) !important;
    padding-bottom: 10px;
     padding-top: 10px;
}

.card-details-row,
.expiry-details-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.card-details-row .wc-block-components-text-input,
.expiry-details-row .wc-block-components-state-input {
    flex: 1;
    min-width: 0;
}

/* For CC and WC field to move upwards*/
.wc-block-components-form .wc-block-components-text-input, .wc-block-components-text-input{
        margin-top: 12px !important;
}


.wc-echeck-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.wc-echeck-row>div {
    flex: 1;
    min-width: 0;
}

/* For echeck select box to move upwards*/
.wc-block-checkout__form .wc-blocks-components-select
{
    margin-top: 0px !important;
}
/* For wc select box to move upwards*/
.wc-blocks-components-select__container{
    margin-top: 12px !important;
}

/* Responsive layout for tablets and phones */
@media screen and (max-width: 768px) {
    .wc-block-components-form-credit-card {
        box-sizing: border-box !important;
        width: calc(100% - 12px) !important;
    }

    .card-details-row,
    .expiry-details-row {
        flex-direction: column;
    }

    .card-details-row .wc-block-components-text-input,
    .expiry-details-row .wc-block-components-state-input {
        width: 100%;
    }

    .wc-echeck-row>div {
        width: 100%;
    }
}

@media only screen and (max-width: 600px) {
    .wc-block-components-form-credit-card {
        box-sizing: border-box !important;
        width: calc(100% - 12px) !important;
    }

    .card-details-row,
    .expiry-details-row {
        flex-direction: column;
    }

    .card-details-row .wc-block-components-text-input,
    .expiry-details-row .wc-block-components-state-input {
        width: 100%;
    }

    .wc-echeck-row {
        flex-direction: column;
    }

    .wc-echeck-row>div {
        width: 100%;
    }
}