/* Force the two calendars side by side on larger screens and adjust for mobile */
@media screen and (max-width: 1200px) {
    [id$="insurance-calculator-result"] {
        display: grid;
        grid-template-columns: auto auto auto;
        column-gap: 20px;
    }
}

@media screen and (max-width: 1200px) {
    div.affiliate a.btn {
        padding: 5px;
        white-space: nowrap;
    }
}

@media screen and (max-width: 992px) {
    .insurance-calculator-form form {
        display: block;
    }
    .passenger-date {
        border-bottom: 1px solid lightgrey;
        padding-bottom: 20px;
    }
    .passenger-date:last-child {
        border-bottom: 1px solid transparent;
        padding-bottom: 0;
    }
    [id$="insurance-calculator-result"] {
        display: grid;
        grid-template-columns: auto auto;
        column-gap: 20px;
    }

    .custom-centered-modal .modal-dialog {
        transform: translate(0%, 0%) !important;
    }

    [id$='period_box'].custom-centered-modal.rtl.show .modal-dialog {
        transform: translate(50%, 0%) !important;
    }

    [id$='period_box'].custom-centered-modal.show .modal-dialog {
        right: 0 !important;
        left: auto !important;
    }
    .custom-centered-modal .modal-dialog-centered {
        margin: 0;
        left: 0;
    }
}

@media screen and (max-width: 769px) {
    .daterangepicker .drp-calendar.left, 
    .daterangepicker .drp-calendar.right {
        float: left;
        width: 50%;
    }

    td.off.ends {
        visibility: visible;
    }

    .daterangepicker .calendar-table th, 
    .daterangepicker .calendar-table td {
        padding: 9px;
    }

    [id$='period_box'].custom-centered-modal.show .p-4 {
        padding: 0;
    }

    [id$="_period"] {
        width: 343px;
        height: 356px;
        position: relative;
    }
}

@media screen and (max-width: 768px) {
    .daterangepicker .drp-calendar.left, 
    .daterangepicker .drp-calendar.right {
        width: 100%;
        float: none;
    }

    /* Hide the second calendar */
    .daterangepicker .drp-calendar.right {
        display: none;
    }
    .d-xs-none {
        display: none !important;
    }
    [id$="_period"] {
        width: 300px;
        height: 327px;
        position: relative;
    }

    [id$='period_box'].custom-centered-modal.rtl.show .modal-dialog {
        transform: translate(0%, 0%) !important;
    }
}

@media screen and (min-width: 730px) {
    .modal-dialog.modal-md {
        max-width: 730px;
        margin: 1.75rem auto;
    }
}

@media screen and (max-width: 730px) {
    .daterangepicker .calendar-table th, 
    .daterangepicker .calendar-table td {
        padding: 8px;
    }
}

@media screen and (max-width: 640px) {
    [id$="insurance-calculator-result"] {
        display: block !important;
        grid-template-columns: auto;
        column-gap: 20px;
    }
    [id$="countries"] {
        width: 100%;
    }
    input[type=number].input-box {
        border-radius: 10px !important;
        padding: 0 4px !important;
        margin: 0 6px !important;
    }
    [id$="insurance-cover-result"] {
        display: grid;
    }
    [id$="insurance-cover-result"] {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 6px;
    }
    [id$="insurance-cover-result"].en,
    [id$="insurance-cover-result"].ar,
    [id$="insurance-cover-result"].he {
        grid-template-columns: repeat(3, 1fr);
        column-gap: 6px;
    }
    .cover-card {
        padding: 0px 4px;
        margin: 4px 0px;
    }
    .date-range-picker-title {
        color: var(--purple);
        font-size: 1.1rem;
        font-weight: bold;
        margin-bottom: 0;
    }

    .daterangepicker {
        width: 100% !important;
    }

    .daterangepicker .drp-calendar.left {
        margin: 0 auto !important;
    }

    .daterangepicker .drp-calendar.left {
        margin: 0 auto !important;
    }

    [id$="period_box"] .daterangepicker.rtl {
        display: block !important;
    }

    [id$="period_box"] .daterangepicker.ltr {
        display: block !important;
    }
}

@media screen and (min-width: 576px) {
    [id$='period_box'].custom-centered-modal.show .modal-dialog {
        margin: 0 auto;
    }
}

@media screen and (min-width: 564px) {
    .daterangepicker .drp-calendar {
        max-width: 400px !important;
        width: 340px;
    }
    .daterangepicker.rtl {
        direction: rtl;
    }
}

@media screen and (max-width: 564px) {
    .daterangepicker .calendar-table th, 
    .daterangepicker .calendar-table td {
        padding: 8px;
    }
    .daterangepicker {
        width: 100%;
    }
    .calendar-table {
        width: 400px;
    }
    .daterangepicker .drp-calendar {
        max-width: 400px;
        margin: 0 auto !important;
    }
    .daterangepicker {
        padding: 10px !important;
        width: 100% !important;
    }
    .btn-share-confirm {
        width: 60% !important;
    }

    [id$="destination_box"] .modal-content,
    [id$="insured_people_box"] .modal-content {
        margin: 0;
    }

    .custom-centered-modal .modal-dialog-centered {
        left: 0;
    }

    [id$="_period"] {
        width: 100%;
        height: 350px;
    }

    [id$='period_box'].custom-centered-modal.show .modal-dialog {
        margin: auto;
        width: 100%;
        left: 50%;
    }

    [id$="_period"] .daterangepicker {
        display: block !important;
        width: 100% !important;
    }

    [id$="insured_people_box"] .modal-md {
        width: 100% !important;
    }

    [id$="destination_box"] .modal-md {
        width: 100% !important;
    }
    .ui-datepicker-calendar {
        right: 47px !important;
    }
}

@media screen and (max-width: 493px) {
    .cover-title {
        font-size: 1.2rem;
    }
    [id$="region_group"] {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        column-gap: 6px;
    }
    [id$="region_group"] p { 
        line-height: 10px;
        margin-bottom: 0;
        margin-top: 0;
    }
    .insured_people span.btn.btn-primary,
    .insured_people span.btn.btn-secondary {
        font-size: 10px;
        line-height: 36px;
    }
    [id$="insured_people_group"] input[type="number"] {
        height: 40px;
    }
    .insured_people label {
        line-height: 40px;
        margin: 0 3px;
    }
    label:empty {
        display: none;
    }
    br {
        display: none;
    }
    .insurance-calculator-form {
        padding: 10px 20px;
    }
    .cancelBtn,
    .applyBtn,
    .insurance-calculator-form input[type="button"] {
        padding: 8px 20px !important;
        margin: 8px !important;
    }
    .daterangepicker .drp-selected {
        width: 100%;
        text-align: center;
        display: block !important;
        font-size: 1rem !important;
    }
    .daterangepicker .drp-buttons {
        text-align: center !important;
    }
    .daterangepicker .calendar-table th, 
    .daterangepicker .calendar-table td {
        padding: 4px;
    }
    .calendar-table {
        width: 340px;
    }
    .daterangepicker .drp-calendar {
        max-width: 340px;
    }
    .daterangepicker {
        left: 0 !important;
        right: 0 !important;
    }
    .daterangepicker {
        padding: 10px !important;
        width: 360px !important;
    }
    [id$="insurance-cover-result"] {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 6px;
    }
}

@media screen and (max-width: 440px) {
    .daterangepicker .calendar-table th, 
    .daterangepicker .calendar-table td {
        padding: 1px;
        font-size: 10px;
    }
    .calendar-table {
        width: 300px;
    }
    .daterangepicker .drp-calendar {
        max-width: 300px;
    }
    [id$="_period"] .daterangepicker {
        margin: auto !important;
        padding: 0 !important;
        display: block;
    }
    
    [id$="destination_box"] .modal-md {
        width: 100%;
    }

    [id$="destination_box"] .modal-content,
    [id$="insured_people_box"] .modal-content {
        margin: 0;
    }

    .custom-centered-modal .modal-dialog-centered {
        left: 0;
    }

    [id$="_period"] {
        width: 100%;
        height: 350px;
    }

    [id$='period_box'].custom-centered-modal.show .modal-dialog .modal-body.p-4 {
        padding: 0 !important;
    }

    .ui-widget-content {
        left: 0;
        margin: 10px 10px;
        width: calc(100% - 20px);
    }
}

@media screen and (max-width: 410px) {
    
    [id$="insurance-cover-result"].ltr {
        grid-template-columns: repeat(1, 1fr);
        column-gap: 6px;
    }

    [id$="insurance-cover-result"].en {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 6px;
    }

    [id$="insurance-cover-result"].he {
        grid-template-columns: repeat(3, 1fr);
        column-gap: 2px;
    }

    [id$="insurance-cover-result"].ar {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 6px;
    }

    .cover-card span {
        font-weight: 500;
    }

    .daterangepicker .calendar-table th, 
    .daterangepicker .calendar-table td {
        padding: 1px;
    }
    .table-condensed td, 
    .table-condensed th {
        font-size: 0.9rem !important;
        font-weight: 300;
    }
    .calendar-table {
        width: 278px;
    }
    .daterangepicker .drp-calendar {
        max-width: 278px;
        margin: 0 !important;
        width: 278px !important;
    }
    div.affiliate a.btn {
        padding: 6px;
    }
    .daterangepicker {
        padding: 10px !important;
        width: 300px !important;
        margin: auto !important;
        display: block !important;
    }
}

@media screen and (max-width: 370px) {
    .btn-share-confirm {
        width: 80% !important;
    }
}

@media screen and (max-width: 340px) {
    [id$="region_group"] {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        column-gap: 6px;
    }
    [id$="region_group"] > div {
        justify-content: space-between;
        align-items: center;
    }
    [id$="region_group"] img { 
        vertical-align: middle;
    }
    [id$="region_group"] p {
        vertical-align: middle;
        margin: 0 auto;
    }
    .content {
        text-align: center !important;
    }
    .insurance-calculator-form {
        padding: 10px;
    }
    div.affiliate {
        justify-content: space-around;
    }
    div.affiliate a.btn {
        width: 100%;
        padding: 5px;
        white-space: nowrap;
    }
    .btn-share-confirm {
        width: 90% !important;
    }
    .daterangepicker .drp-calendar {
        width: 278px !important;
    }
}