.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none; /* Flexbox for centering */
    align-items: center; /* Vertical center */
    justify-content: center; /* Horizontal center */
    z-index: 10000;
  }
  
  .popup-content {
    background: white;
    width: 80%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
    border-radius: 6px;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  }
  
.close-btn {
    position: absolute;
    right: 10px;
    top: 0px;
    background: none;
    border: none;
    font-size: 35px;
    cursor: pointer;
}

.multi-select-sec {
    position: relative;
}
.multi-select-box-sec {
    cursor: pointer;
    padding: 8px;
    background: #ffffff;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: left;
}
.st-txt{
    font-size: 14px; 
}
.multi-select-dropdown-sec {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ccc;
    width: 100%;
    max-height: 150px;
    overflow-y: auto;
    z-index: 10;
}
.multi-select-option-sec {
    padding: 8px;
    cursor: pointer;
}
.multi-select-option-sec:hover {
    background: #f0f0f0;
}
.selected-services {
    margin-top: 0px;
}
.selected-service {
    display: inline-block;
    padding: 4px 8px;
    margin: 5px;
    background-color: #00395A;
    color: white;
    border-radius: 3px;
    font-size: 11px;
}

.selected-address{
    display: inline-block;
    padding: 3px 3px;
    color: #232323;
    border-radius: 3px;
    font-size: 11px;

}
.remove-cross {
    cursor: pointer;
    margin-left: 5px;
    color: white;
    font-weight: bold;
}
.serviceTableClass .hidden-title{
    display: none;
}

.OnboardNextBtn{
    width:50% !important;
}
/* Desktop: border around table header row only, matching Figma */
@media (min-width: 768px) {
    .ob-plaid-table {
        border-collapse: separate !important;
        border-spacing: 0 !important;
    }
    .ob-plaid-thead th {
        background-color: #fff !important;
        border-top: 1px solid #D1D3D4 !important;
        border-bottom: 1px solid #D1D3D4 !important;
        border-left: none !important;
        border-right: none !important;
        padding: 20px 10px!important;
    }
    .ob-plaid-thead th:first-child {
        border-left: 1px solid #D1D3D4 !important;
        border-radius: 12px 0 0 0!important;
    }
    .ob-plaid-thead th:last-child {
        border-right: 1px solid #D1D3D4 !important;
        border-radius: 0 12px 0 0;
    }
}


@media only screen and (max-width: 767px) {
    .serviceTableClass {
        display: flex;
        flex-direction: column;
        background: #f5f5f5;
        padding: 20px 10px;
    }
    /* Alternate background for even rows */
    .serviceTableClass:nth-child(even) {
        background: #ffffff;
    }
    .serviceTableClass td{
        width:100% !important;
    }
    .plaid-table-header{
        display: none;
    }
    .serviceTableClass .hidden-title{
        display: flex;
    }
    .popup-content {
        padding:0;
        width:90%
    }
    .close-btn {
        top:4px;
    }
    .popup-content h5{
        padding: 20px 0px 0 20px;
    }

    .OnboardNextBtn{
        width:85% !important;
    }
    .btn-vm-onboard{
        width:220px;
    }

    /* Prevent overflow-x:clip on #table-onbrd from clipping mobile card content */
    #table-onbrd {
        overflow-x: hidden !important;
    }
}

/* ── Plaid onboarding mobile cards (global — cards are hidden on desktop via d-md-none) ── */
.plaid-mob-card {
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 10px 4px;
    
}
.plaid-mob-card:nth-child(odd) {
    background-color: #F7F7F7;
}
.plaid-mob-card:nth-child(even) {
    background-color: #ffffff;
}
.plaid-mob-line {
    display: flex;
    align-items: center;
    padding: 4px 6px;
    gap: 8px;
}
.mob-addr-box{
    border:none!important;
}
.plaid-mob-line--last {
    border-bottom: none;
}
.plaid-mob-line.plaid-mob-line--name {
    padding-left: 0;
}
.plaid-mob-date {
    flex: 1;
    font-weight: 600;
    font-size: 16px;
    color: #232323;
    text-align: left;
}
.plaid-mob-amount {
    font-weight: 600;
    font-size: 16px;
    color: #232323;
    text-align: right;
    white-space: nowrap;
}
.plaid-mob-name {
    flex: 1;
    font-size: 16px;
    color: #232323;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    font-weight: 500;
}
.plaid-mob-address {
    flex: 1;
    min-width: 0;
    overflow: visible;
}
.plaid-mob-category {
    flex: 1;
    min-width: 0;
    overflow: visible;
}
.plaid-mob-confirm {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
}
.plaid-mob-confirm-lbl {
    font-size: 10px;
    color:#00395A;
    font-weight: 400;
}
.plaid-mob-card .multi-select-box-sec {
    font-size: 16px;
}
/* mob-addr-box intent: remove border from address dropdown only */
.plaid-mob-address .multi-select-box-sec {
    border: none !important;
}
.plaid-mob-address .cus-mul-drop-dd {
    gap: 10px;
}
.plaid-mob-address .selected-address {
    display: flex;
    align-items: center;
    gap: 5px;
}
.plaid-mob-address .addrs-font {
    font-size: 16px;
}
.plaid-mob-card .drop-down-img-address {
    width: 14px;
    height: 14px;
}
/* Constrain dropdowns inside mobile cards */
.plaid-mob-card .multi-select-sec,
.plaid-mob-card .multi-select-box-sec {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}
.plaid-mob-card .selected-services,
.plaid-mob-card .selected-address {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
}
/* Address dropdown: prevent right overflow on mobile */
@media only screen and (max-width: 767px) {
    .plaid-mob-address .ob-addr-drop {
        left: auto;
        right: 0;
        min-width: calc(100vw - 42px);
        max-width: calc(100vw - 32px);
    }
    /* Category dropdown: match plaid-mob-category width on mobile */
    .plaid-mob-category .ob-cat-drop {
        left: 0;
        right: auto;
        width: 100%;
        min-width: unset;
        max-width: unset;
    }
    .plaid-mob-card{
        border-radius: 0 !important;
    }
    .plaid-mob-name {
    text-align: left;
    padding-left: 4px;
    }
}

/* Duplicate Service Popup Styles */
.duplicate-service-list {
    margin-top: 10px;
}

.duplicate-service-item {
    padding: 12px 15px 12px 45px;
    border: 1px solid #e0e0e0;
    border-radius: 9px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
    background: #fff;
    margin-left: 10px;
    margin-right: 10px;
    position: relative;
}

.duplicate-service-item .form-check-input {
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
}

.duplicate-service-item:hover {
    background: #f8f9fa;
    border-color: #00395A;
}

.duplicate-service-item .form-check-input:checked ~ .form-check-label {
    color: #00395A;
}

.duplicate-service-item .form-check-label {
    cursor: pointer;
    width: 100%;
    margin-left: 10px;
}

.duplicate-service-item .badge {
    font-size: 11px;
    font-weight: normal;
    background-color: #78A22D!important;
}

#duplicateServicePopup .modal-content {
    border-radius: 16px;
}

#duplicateServicePopup .scroll-modal {
    max-height: 350px;
    overflow-y: auto;
}

@media only screen and (max-width: 767px) {
    #duplicateServicePopup .modal-footer {
        flex-direction: column;
    }

    #duplicateServicePopup .modal-footer .btn {
        width: 100%;
    }
    .plaid-mob-line {
        padding: 0px 6px!important;
    }
    .plaid-mob-line.plaid-mob-line--name {
        padding-left: 0 !important;
    }
}