/* Loading States

.spinner-border
  display: inline-block
  width: 2rem
  height: 2rem
  vertical-align: -0.125em
  border: 0.25em solid currentcolor
  border-right-color: transparent
  border-radius: 50%
  animation: 0.75s linear infinite spinner-border

  &-sm
    width: 1rem
    height: 1rem
    border-width: 0.2em

@-webkit-keyframes spinner-border
  to
    transform: rotate(360deg)

@keyframes spinner-border
  to
    transform: rotate(360deg)

.loading-state
  opacity: 0.6
  pointer-events: none

.appointment-wizard
  box-shadow: 0px 0px 12px 1px rgba(212,212,212,0.75)
  margin: 0

  .error-message
    display: flex
    position: absolute
    top: 1rem
    right: 1rem
    z-index: 50
    padding: 0.25rem 0.65rem 0.25rem 1rem
    gap: 0.25rem
    justify-content: space-between
    align-items: center
    border-radius: 0.25rem
    border-width: 1px
    border-color: #F87171
    max-width: 28rem
    font-size: 0.875rem
    line-height: 1.25rem
    color: #B91C1C
    background-color: #FEE2E2
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)

  .loading-overlay
    display: flex
    position: absolute
    top: 0
    right: 0
    bottom: 0
    left: 0
    justify-content: center
    align-items: center
    background-color: rgba(107, 114, 128, 0.5)
    z-index: 99

  .btn
    padding-top: 0.5rem
    padding-bottom: 0.5rem
    padding-left: 1.5rem
    padding-right: 1.5rem
    border-radius: 0.5rem
    border-width: 0
    font-weight: 500
    transition-property: all
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1)
    transition-duration: 300ms
    transition-duration: 300ms
    transition-timing-function: cubic-bezier(0, 0, 0.2, 1)
    line-height: 1.5
    &.btn-outline-secondary
      background-color: #f8f9fa
      &:hover
        color: $white
        background-color: $secondary
        border-color: $secondary

  .form-group
    label
      margin-bottom: .25rem
    select.form-control
      appearance: none
      background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e")
      background-position: right 0.5rem center
      background-repeat: no-repeat
      background-size: 1.5em 1.5em
      padding-right: 2.5rem
      -webkit-print-color-adjust: exact
      print-color-adjust: exact

    .custom-control-label
      padding-top: .25rem
      margin-bottom: 0

  .form-control
    padding-top: 0.5rem
    padding-bottom: 0.5rem
    padding-left: 1rem
    padding-right: 1rem
    border-radius: 0.375rem
    border-width: 1px
    border-color: #D1D5DB
    width: 100%
    font-size: 0.85rem
    line-height: 1.25rem
    height: auto
    background-color: rgba(245, 245, 245, .25)

  .custom-control-label::after
    background-color: rgba(245, 245, 245, .25)

/* Personal Info Step

.appointment-personal-info
  min-height: 100%
  background-color: #FFFFFF

  .image-section
    padding-right: 5rem
    min-height: 100%
    display: flex
    flex-direction: column
    justify-content: center

    .image-content
      position: relative
      height: 100%

      .people-image
        object-fit: cover
        width: 100%
        height: auto
        bottom: 4rem

      .logos-image
        object-fit: cover
        position: absolute
        width: 100%
        height: auto

  .black-div-bg
    position: absolute
    bottom: 0
    left: 0
    width: 100%
    height: 24rem
    object-fit: cover
    z-index: 2
    @include phone
        display: none
  .form-section
    min-height: 100%
    display: flex
    align-items: center
    z-index: 10

  .form-card
    max-width: 600px
    margin: 0 auto
    width: 100%
    @include phone
        border: 0 !important

/* Form Validation States

.form-control.is-invalid
  border-color: #dc3545
  background-color: #fef2f2

.checkbox-error
  padding: 0.5rem
  border: 1px solid #f5c6cb
  border-radius: 0.25rem
  background-color: #f8d7da

/* Company Dropdown

.company-dropdown
  position: absolute !important
  top: 100% !important
  left: 0 !important
  right: 0 !important
  margin-top: 0.125rem
  border: 1px solid rgba(0, 0, 0, 0.15)
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175)

  .dropdown-item
    padding: 0.35rem 1rem
    cursor: pointer

    &:hover
      background-color: #f8f9fa

  .company-results
    max-height: 300px
    overflow-y: auto
    overflow-x: hidden

  .company-name
    font-size: 0.825rem
    font-weight: 500
    color: $gray-800

  .company-domain
    font-size: 0.75rem
    color: $gray-500

/* Service Selection Cards

.service-card
  transition: all 0.3s ease
  cursor: pointer

  &:hover
    transform: translateY(-5px)

.shadow-hover:hover
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.175) !important

.service-icon-wrapper
  display: inline-block

.service-icon
  width: 80px
  height: 80px
  border-radius: 50%
  display: flex
  align-items: center
  justify-content: center
  transition: all 0.3s ease

.service-icon-support
  background-color: rgba(40, 167, 69, 0.1)
  color: #28a745

.service-icon-sales
  background-color: rgba(0, 123, 255, 0.1)
  color: #007bff

.service-card:hover .service-icon
  transform: rotate(12deg)

/* Date Time Selection

.appointment-datetime-selection
  height: 490px
  .row
    height: 100%
    .date-selection,
    .time-slot-selection
      display: flex
      flex-direction: column
      height: 100%

  .time-slots-container
    flex-grow: 1
    overflow-y: auto
    display: flex
    flex-direction: column
    justify-content: center  // centers vertically when empty
    align-items: center      // centers horizontally when empty

    &.has-content
      justify-content: flex-start  // aligns content at top when slots exist
      align-items: stretch         // allows grid to fill full width

      .col-6.col-sm-4.col-md-3:nth-last-child(-n + 4)
        margin-bottom: 0 !important

.appointment-datetime-selection
  .time-slots-container.has-content
    @media (min-width: 768px)
      .col-md-3:nth-last-child(-n + 4)
        margin-bottom: 0 !important

    @media (min-width: 576px) and (max-width: 767.98px)
      .col-sm-4:nth-last-child(-n + 3)
        margin-bottom: 0 !important

    @media (max-width: 575.98px)
      .col-6:nth-last-child(-n + 2)
        margin-bottom: 0 !important


.time-slots-container
  min-height: 0
  overflow-y: auto

/* Calendar Styles Override

.simple-calendar
  background: white
  border: 1px solid #dee2e6
  border-radius: 0.5rem
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075)
  max-width: 21rem
  margin: 0 auto
  overflow: hidden

.calendar-header
  display: flex
  justify-content: space-between
  align-items: center
  padding: .75rem .25rem
  border-bottom: 1px solid #dee2e6
  background: #f8f9fa

  button.btn
    background: none
    border: none
    font-size: 1.25rem
    cursor: pointer
    padding: 0.25rem 0.5rem
    border-radius: 0.25rem

    &:hover
      background-color: rgba(77,77,77,0.05)

.calendar-weekdays
  display: grid
  grid-template-columns: repeat(7, 1fr)
  background: #f8f9fa
  border-bottom: 1px solid #dee2e6

.weekday
  padding: 0.75rem 0.5rem
  text-align: center
  font-size: 0.75rem
  font-weight: 600
  color: $text-muted
  text-transform: uppercase

.calendar-days
  display: grid
  grid-template-columns: repeat(7, 1fr)
  gap: 1px
  background: #dee2e6

.calendar-day
  background: white
  padding: 0.75rem 0.5rem
  text-align: center
  cursor: pointer
  min-height: 40px
  display: flex
  align-items: center
  justify-content: center
  font-size: 0.875rem

  &:hover:not(.disabled):not(.selected)
    background-color: #f8f9fa

  &.today
    font-weight: 600
    background-color: #fff3cd
    color: #856404

  &.selected
    background-color: #007bff
    color: white
    font-weight: 600

  &.disabled
    color: #dee2e6
    cursor: not-allowed
    background-color: #f8f9fa

/* Time Slot Buttons

.slot-button
  transition: all 0.2s ease
  background-color: #f8f9fa

  &:hover:not(:disabled)
    transform: translateY(-2px)
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1)

  &.active
    background-color: #007bff !important
    border-color: #0056b3 !important
    color: white !important

/* Confirmation Step

.animate-fadeIn
  animation: fadeIn 0.7s ease-in

@keyframes fadeIn
  from
    opacity: 0
    transform: translateY(20px)

  to
    opacity: 1
    transform: translateY(0)

.success-icon-wrapper
  display: inline-block

.success-icon
  width: 60px
  height: 60px
  background-color: #28a745
  border-radius: 50%
  display: flex
  align-items: center
  justify-content: center
  color: white
  font-size: 1.5rem

.pulse
  animation: pulse 2s infinite

@keyframes pulse
  0%
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4)

  70%
    box-shadow: 0 0 0 10px rgba(40, 167, 69, 0)

  100%
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0)

.appointment-details
  border-radius: .75rem

/* Recording Indicator Animation

.blink
  animation: blink-animation 1s infinite

@keyframes blink-animation
  0%
    opacity: 1

  50%
    opacity: 0

  100%
    opacity: 1

/* Responsive Adjustments
@media (max-width: 767.98px)
  .appointment-wizard
    padding: 0
    box-shadow: none !important
    border: none !important
    .personal-info-template
      .card
        border: none !important
    .card-body
      padding: 0 !important
  .service-card .card-body
    padding: 2rem !important

  .appointment-personal-info .form-card
    padding: 0 !important
    box-shadow: none
    border: none

  .time-slots-container
    max-height: 300px
  .appointment-datetime-selection
    height: 100%


/* Print Styles
@media print
  .calendar-header button, #error-message, #loading-overlay, #recording-indicator, .slot-button:not(.active)
    display: none !important

/* Utilities

.shadow-hover
  transition: box-shadow 0.3s ease

/* Custom scrollbar for time slots

.time-slots-container
  &::-webkit-scrollbar
    width: 8px

  &::-webkit-scrollbar-track
    background: #f1f1f1
    border-radius: 4px

  &::-webkit-scrollbar-thumb
    background: #888
    border-radius: 4px

    &:hover
      background: #555
.custom_padding_top_app
    @include phone
        .col-lg-6
            padding: 0 !important
