
#hr {
  border: 1px solid black;
}


  #bg-text
{
  color:lightgrey;
  font-size:80px;
  transform:rotate(310deg);
  -webkit-transform:rotate(310deg);
  position: relative;
  top: 250px;
  left: 250px;
}

.signature-sign-div{
  height: 200px;
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 1%;
  margin-bottom: 3%;

}

.signature-sign-div div{
  height: 100%;
  display: flex;
  flex-flow: column;
  justify-content: end;
  align-items: center;
  margin-top:  1%;
}


.signature-image img{
  height: 200px;
  width: 100%;
  object-fit: cover;

}

.schedule-top-section{
  align-items: first baseline;
  padding-top: 15px;
  padding-bottom: 10px;
}

.page-heading{
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
}

.clear-padding{
  margin: 2%;
}

.form-single-div{
  margin-bottom: 2%;
}

.table-input,.table-select{
  border: none;
  width: 100%;
  height: 100%;
}

.table-input:focus,.table-input::selection,.table-select{
  border: none;
  outline: none;
}

.table-input:-webkit-autofill,
.table-input:-webkit-autofill:hover, 
.table-input:-webkit-autofill:focus, 
.table-input:-webkit-autofill:active{
    -webkit-box-shadow: 0 0 0 30px white inset !important;
}

.table-select{
  margin: 0;
}

.input-bg{
  border: none;
  outline: none;
  border-radius: 6px;
  background-color: #E5E7EB;
  padding: 8px 16px;
}


.comment-card{
  border: none;
  border-radius: 10px;
  padding: 2%;
  background-color: #E5E7Eb;
}

.text-bold{
  font-weight: bold !important;
  color: black;
}

.icon-row-div{
  margin-right: 4%;
}

.icon-row-div div{
  margin-left: 15px;
  border-radius: 50px;
  background-color: white;
  padding: 6%;
  cursor: pointer;
}

.icon-row-div div i{
  color: black;
}

.row1{
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
}

/* ============================================
   MOBILE RESPONSIVE OVERRIDES
   ============================================ */

@media (max-width: 767.98px) {

  /* -- Global layout fixes -- */
  .app-content {
    padding: 0 !important;
  }

  .app-content .content-wrapper {
    padding: 0.5rem !important;
  }

  .content-header-title {
    font-size: 1rem !important;
  }

  /* -- Breadcrumbs: horizontal flow on mobile -- */
  .breadcrumb-wrapper {
    padding-left: 0 !important;
  }

  .content-header-left .content-header-title {
    float: none !important;
    display: block;
    margin-bottom: 0.25rem;
  }

  .breadcrumbs-top .col-12 {
    display: flex;
    flex-direction: column;
  }

  .breadcrumb {
    flex-wrap: wrap;
    padding: 0;
    margin-bottom: 0.25rem;
  }

  .breadcrumb-item {
    font-size: 0.75rem;
  }

  /* -- Show action buttons on mobile (view.blade.php) -- */
  .content-header-right.d-md-block.d-none {
    display: block !important;
  }

  .content-header-right .d-flex {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .content-header-right .btn-sm,
  .content-header-right .btn {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
    margin-bottom: 0.25rem;
  }

  /* -- Cards: full width, no overflow -- */
  .card {
    margin-left: 0;
    margin-right: 0;
  }

  .card-body {
    padding: 0.75rem !important;
  }

  /* -- Tables: horizontal scroll on mobile -- */
  .table-responsive,
  .dataTables_wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  table.dataTable,
  .table {
    min-width: 600px;
  }

  /* -- Sticky last column (actions) in tables -- */
  .table-responsive table th:last-child,
  .table-responsive table td:last-child {
    position: sticky;
    right: 0;
    background: #fff;
    z-index: 1;
    box-shadow: -2px 0 4px rgba(0,0,0,0.08);
    min-width: 50px;
  }

  .table-responsive table tr[style] td:last-child {
    background: inherit;
  }

  /* -- Agent Profile & Policy View: stack sidebar tabs above content -- */
  #page-account-settings .row > .col-md-2 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  #page-account-settings .row > .col-md-9 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  #page-account-settings .nav-pills {
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  #page-account-settings .nav-pills .nav-link {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.8rem;
  }

  #page-account-settings .nav-pills .nav-link i {
    font-size: 1rem !important;
    margin-right: 0.25rem !important;
  }

  /* -- Policy Index / Customer Index: nav tabs wrap -- */
  .nav-tabs {
    flex-wrap: wrap;
  }

  .nav-tabs .nav-item {
    flex: 0 0 auto;
  }

  .nav-tabs .nav-link {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }

  /* -- Forms: full-width columns on mobile -- */
  #page-account-settings .col-md-4,
  #page-account-settings .col-md-6,
  .steps-validation .col-md-4,
  .steps-validation .col-md-3,
  .steps-validation .col-md-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  /* -- Status summary cards: 3 per row on mobile -- */
  #stat-summary .col-md-4,
  #stat-summary .col-lg-3 {
    flex: 0 0 33.333% !important;
    max-width: 33.333% !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
    margin-bottom: 0.5rem !important;
  }

  #stat-summary .dashboard-card {
    padding: 0.5rem !important;
  }

  #stat-summary .dashboard-card h2 {
    font-size: 1.1rem;
  }

  #stat-summary .dashboard-card p {
    font-size: 0.65rem;
    margin-bottom: 0.25rem !important;
  }

  #stat-summary .rounded-circle {
    padding: 0.25rem !important;
  }

  #stat-summary .rounded-circle i {
    font-size: 1rem !important;
  }

  /* -- Action buttons (Transaction Enquiry, Add New Policy, etc): side by side -- */
  .alert.alert-primary .d-flex {
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center !important;
  }

  .alert.alert-primary .btn {
    flex: 0 0 auto;
    font-size: 0.72rem;
    padding: 0.4rem 0.75rem;
    white-space: nowrap;
  }

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

  /* -- Buttons: don't overflow on small screens -- */
  .btn {
    white-space: normal;
    word-wrap: break-word;
  }

  /* -- Wizard steps: scrollable on mobile -- */
  .steps-validation .steps > ul {
    flex-wrap: wrap;
  }

  .steps-validation .steps > ul > li {
    flex: 0 0 auto;
    width: auto;
  }

  /* -- DataTable search/filter controls -- */
  .dataTables_filter,
  .dataTables_length {
    text-align: left !important;
    margin-bottom: 0.5rem;
  }

  .dataTables_filter input,
  .dataTables_length select {
    width: 100% !important;
    max-width: 100%;
  }

  /* -- Header navbar adjustments -- */
  .header-navbar .navbar-container {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  .header-navbar .navbar-container ul.nav li.dropdown .dropdown-menu {
    right: 0 !important;
  }

  /* -- Font sizes for readability -- */
  body {
    font-size: 0.85rem;
  }

  .font-small-2 {
    font-size: 0.8rem !important;
  }

  /* -- Prevent horizontal page overflow -- */
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  .content-wrapper {
    overflow-x: hidden;
  }
}

/* Extra small devices (Galaxy S5, etc - 360px and below) */
@media (max-width: 400px) {

  .card-body {
    padding: 0.5rem !important;
  }

  .form-group label {
    font-size: 0.78rem;
  }

  .form-control {
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
  }

  .custom-select {
    font-size: 0.8rem;
  }

  .btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.5rem;
  }

  #page-account-settings .nav-pills .nav-link {
    font-size: 0.72rem;
    padding: 0.35rem 0.5rem !important;
  }

  .content-header-title {
    font-size: 0.85rem !important;
  }

  .breadcrumb-item {
    font-size: 0.72rem;
  }

  /* Status summary cards: 2 per row on very small screens */
  #stat-summary .col-md-4,
  #stat-summary .col-lg-3 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
}

/* ============================================
   SCHEDULE / PRINT MOBILE OVERRIDES
   Preserve desktop layout structure, just scale down
   ============================================ */

@media (max-width: 767.98px) {

  /* -- Watermark: reposition for mobile -- */
  #bg-text {
    font-size: 36px !important;
    top: 120px !important;
    left: 50% !important;
    transform: translateX(-50%) rotate(310deg) !important;
    -webkit-transform: translateX(-50%) rotate(310deg) !important;
    text-align: center;
    width: 100%;
  }

  /* -- Schedule pages: shrink fonts, keep layout intact -- */
  .invoice-page,
  .invoice-print {
    font-size: 0.6rem !important;
    padding: 0 !important;
  }

  .invoice-page p,
  .invoice-print p {
    font-size: 0.6rem !important;
    margin-bottom: 0.15rem !important;
    line-height: 1.25 !important;
  }

  .invoice-page h4,
  .invoice-print h4 {
    font-size: 0.8rem !important;
    margin-bottom: 0.2rem !important;
  }

  .invoice-page strong,
  .invoice-print strong {
    font-size: inherit;
  }

  /* Keep 2-column side-by-side for schedule top section */
  .schedule-top-section .col-sm-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }

  /* Logo + QR row: keep side by side, scale images */
  .invoice-page > .row:first-child .col-sm-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }

  .invoice-page > .row:first-child img {
    max-width: 50px;
  }

  /* Tables inside schedules: small but readable */
  .invoice-page .table,
  .invoice-print .table {
    font-size: 0.58rem !important;
    min-width: auto !important;
  }

  .invoice-page .table th,
  .invoice-page .table td,
  .invoice-print .table th,
  .invoice-print .table td {
    padding: 0.15rem 0.2rem !important;
    font-size: 0.58rem !important;
    word-break: break-word;
  }

  /* Schedule action buttons row */
  .invoice-print .col-md-7 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .invoice-print .col-md-7 .btn,
  .invoice-print .col-md-5 .btn {
    font-size: 0.62rem;
    padding: 0.25rem 0.4rem;
    margin-bottom: 0.25rem;
  }

  /* Signature section: keep side by side, shrink */
  .signature-sign-div {
    height: 120px !important;
  }

  .signature-image img {
    height: 80px !important;
  }

  /* Print layout: keep col-xs-6 side-by-side (Bootstrap 3 grid) */
  .col-xs-6 {
    width: 50% !important;
    float: left !important;
  }

  /* #hr divider */
  #hr {
    margin: 0.15rem 0 !important;
  }
}

@media (max-width: 400px) {

  .invoice-page,
  .invoice-print {
    font-size: 0.52rem !important;
  }

  .invoice-page p,
  .invoice-print p {
    font-size: 0.52rem !important;
    line-height: 1.2 !important;
  }

  .invoice-page .table th,
  .invoice-page .table td,
  .invoice-print .table th,
  .invoice-print .table td {
    padding: 0.1rem 0.15rem !important;
    font-size: 0.5rem !important;
  }

  .invoice-page h4,
  .invoice-print h4 {
    font-size: 0.7rem !important;
  }
}

/* ============================================
   MODALS — keep the dialog inside the viewport
   ============================================ */

/* bootstrap-extended.css declares `.modal .modal-content { overflow: visible }`.
   It has the same specificity as Bootstrap's
   `.modal-dialog-scrollable .modal-content { overflow: hidden }` but loads after
   it, so it wins — the modal body never clips and tall modals (e.g. the Update
   Customer form) run past the bottom of the screen with the submit button
   unreachable. Restore the clip so .modal-body scrolls instead of the page. */
.modal .modal-dialog-scrollable .modal-content {
  overflow: hidden;
}

.modal .modal-dialog-scrollable .modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 767.98px) {

  /* Use the full width, minus a small gutter, on phones */
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }

  .modal-sm,
  .modal-lg,
  .modal-xl {
    max-width: calc(100% - 1rem) !important;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

  /* Safety net, phones only: modals that never opted into
     .modal-dialog-scrollable still can't grow past the screen. Deliberately
     NOT applied on desktop — turning .modal-content into a scroll container
     would clip inline .dropdown-menu popups in the ~50 modals that don't
     declare .modal-dialog-scrollable, and on desktop they already fit. */
  .modal .modal-dialog:not(.modal-dialog-scrollable) > .modal-content {
    max-height: calc(100vh - 1rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Tighter chrome so more of the form is visible */
  .modal-header {
    padding: 0.6rem 0.75rem;
  }

  .modal-title {
    font-size: 0.95rem;
  }

  .modal-body {
    padding: 0.75rem;
  }

  .modal-footer {
    padding: 0.5rem 0.75rem;
  }

  /* Form fields inside modals go full width */
  .modal-body .col-md-6,
  .modal-body .col-md-4,
  .modal-body .col-md-3 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  /* Submit rows stack and stay reachable */
  .modal-body .d-flex.justify-content-end .btn {
    width: 100%;
    margin-top: 0.25rem;
  }
}
