/* Responsive styles for My Lessons, Appointment, and Reservation pages */

/* Override .contents width on mobile */
@media (max-width: 768px) {
  .contents {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 8px !important;
  }
  
  .contents > .left,
  .contents > .single {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }
}

@media (max-width: 480px) {
  .contents {
    padding: 8px 4px !important;
  }
}

/* Box and heading responsive */
@media (max-width: 768px) {
  .box {
    margin-bottom: 15px;
  }
  
  .box .heading {
    font-size: 16px !important;
    line-height: 1.4 !important;
    padding: 12px 10px !important;
  }
  
  .box-inner {
    padding: 12px 10px !important;
  }
  
  .box-inner.p20 {
    padding: 12px 10px !important;
  }
  
  .box-inner.p15 {
    padding: 10px 8px !important;
  }
}

@media (max-width: 480px) {
  .box .heading {
    font-size: 14px !important;
    padding: 10px 8px !important;
  }
  
  .box-inner {
    padding: 10px 8px !important;
  }
  
  .box-inner.p20 {
    padding: 10px 8px !important;
  }
  
  .box-inner.p15 {
    padding: 8px 6px !important;
  }
}

/* Tabs responsive */
@media (max-width: 768px) {
  .box.with-tabs ul.tabs {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }
  
  .box.with-tabs ul.tabs > li {
    flex: 1 1 auto;
    min-width: 0;
  }
  
  .box.with-tabs ul.tabs > li > a,
  .box.with-tabs ul.tabs > li > span {
    font-size: 13px !important;
    padding: 8px 4px !important;
    white-space: normal;
    line-height: 1.3 !important;
    height: auto !important;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .box.with-tabs ul.tabs > li > a i,
  .box.with-tabs ul.tabs > li > span i {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .box.with-tabs ul.tabs > li {
    flex: 1 1 100%;
    width: 100%;
  }
  
  .box.with-tabs ul.tabs > li > a,
  .box.with-tabs ul.tabs > li > span {
    font-size: 12px !important;
    padding: 10px 6px !important;
  }
}

/* Filter form responsive (My Lessons) */
@media (max-width: 768px) {
  .p10.pb0.pl15 {
    padding: 10px 8px !important;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-end;
  }
  
  .form-select.w100,
  .form-select.w90 {
    width: 100% !important;
    margin-left: 0 !important;
    margin-bottom: 8px;
  }
  
  .form-select.w90.ml4 {
    margin-left: 0 !important;
  }
  
  .btn.w80.ml8 {
    width: 100% !important;
    margin-left: 0 !important;
    margin-top: 8px;
  }
}

/* Reservation search row responsive */
@media (max-width: 768px) {
  .reservation-search-row {
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  .reservation-search-row > div {
    width: 100% !important;
  }
  
  .reservation-search-row .form-select {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .reservation-search-row .btn {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Lesson list items responsive */
@media (max-width: 768px) {
  .box-inner.with-thumb {
    display: block !important;
  }
  
  .box-inner.with-thumb dt {
    width: 100% !important;
    text-align: center;
    margin-bottom: 10px;
  }
  
  .box-inner.with-thumb dd {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: left;
  }
  
  .box-inner.with-thumb dd.min {
    width: 100% !important;
    text-align: left;
    margin-top: 10px;
  }
  
  .box-inner.with-thumb dd.min.tr {
    text-align: left !important;
  }
  
  .box-inner.with-thumb .vb {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .box-inner.with-thumb .vb > span {
    margin-left: 0 !important;
    margin-top: 4px;
  }
}

@media (max-width: 480px) {
  .box-inner.with-thumb .vb {
    font-size: 13px;
  }
  
  .box-inner.with-thumb .f14px {
    font-size: 13px !important;
  }
  
  .box-inner.with-thumb .f15px {
    font-size: 14px !important;
  }
}

/* Next Lesson section responsive */
@media (max-width: 768px) {
  .latestlesson {
    margin-bottom: 15px !important;
    padding: 12px 10px !important;
  }
  
  .latestlesson .heading {
    font-size: 16px !important;
    margin-bottom: 10px !important;
  }
  
  .latestlesson .lesson-content {
    flex-direction: column;
    align-items: center;
  }
  
  .latestlesson .teacher-image-wrapper {
    margin-bottom: 10px;
  }
  
  .latestlesson .lesson-details {
    width: 100%;
    text-align: center;
  }
}

/* Appointment page dl.table responsive */
@media (max-width: 768px) {
  .box.table {
    display: block !important;
  }
  
  .box.table dt {
    width: 100% !important;
    text-align: center;
    margin-bottom: 10px;
  }
  
  .box.table dd {
    width: 100% !important;
    text-align: center;
  }
  
  .box.table .w70 {
    width: 100% !important;
  }
}

/* Results section responsive (Reservation page) */
@media (max-width: 768px) {
  .resultset {
    margin-top: 15px !important;
  }
  
  .resultset .header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  
  .resultset .header .form-select.order {
    width: 100%;
    margin-right: 0 !important;
    margin-bottom: 8px;
  }
  
  .resultset .header .form-inline {
    width: 100%;
    text-align: left;
  }
  
  .resultset .header .pager {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
  }
  
  /* Same column width for teachers and schedules (124px per column) */
  .schedule .teachers ul.inner {
    display: table;
    table-layout: fixed;
    margin: 0 0 0 71px;
  }
  
  .schedule .teachers ul.inner li {
    display: table-cell;
    width: 124px;
    min-width: 124px;
    max-width: 124px;
    box-sizing: border-box;
  }
  
  .schedule .schedules {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .schedule .schedules ul.inner {
    display: table;
    table-layout: fixed;
    min-width: 600px;
  }
  
  .schedule .schedules ul.inner > li {
    width: 124px;
    min-width: 124px;
    max-width: 124px;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  .schedule .teachers ul.inner li {
    width: 124px;
    min-width: 124px;
    max-width: 124px;
  }
  
  .schedule .schedules ul.inner > li {
    width: 124px;
    min-width: 124px;
    max-width: 124px;
  }
  
  .schedule .teacher dt img.thumb,
  .schedule .teacher dt .thumb {
    width: 60px !important;
    height: 60px !important;
  }
  
  .schedule .teacher dd {
    font-size: 11px;
  }
}

/* Pagination responsive */
@media (max-width: 768px) {
  .pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }
  
  .pager li {
    margin: 0 2px;
  }
  
  .pager li span,
  .pager li a {
    padding: 6px 8px;
    font-size: 13px;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .pager li span,
  .pager li a {
    padding: 5px 6px;
    font-size: 12px;
    min-width: 32px;
    min-height: 32px;
  }
}

/* Buttons responsive */
@media (max-width: 768px) {
  .btn {
    padding: 10px 14px;
    font-size: 14px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  .btn.small {
    padding: 8px 12px;
    font-size: 13px;
    min-height: 40px;
  }
  
  .btn.w100 {
    width: 100%;
  }
}

/* Badge responsive */
@media (max-width: 480px) {
  .badge {
    font-size: 11px;
    padding: 4px 8px;
  }
}

/* Form select responsive */
@media (max-width: 768px) {
  .form-select {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .form-select.w180 {
    width: 100% !important;
  }
}

/* Alert responsive */
@media (max-width: 480px) {
  .alert {
    padding: 10px 8px;
    font-size: 13px;
  }
}

/* Number circle responsive */
@media (max-width: 480px) {
  .number-circle {
    font-size: 14px;
    width: 22px;
    height: 22px;
    line-height: 22px;
  }
}

/* Text responsive */
@media (max-width: 480px) {
  .f14px { font-size: 13px !important; }
  .f15px { font-size: 14px !important; }
  .f12px { font-size: 11px !important; }
  
  .small {
    font-size: 12px !important;
  }
  
  .bold {
    font-weight: 600;
  }
}

/* Spacing adjustments */
@media (max-width: 768px) {
  .mt10 { margin-top: 8px !important; }
  .mt15 { margin-top: 10px !important; }
  .mt20 { margin-top: 12px !important; }
  .mt30 { margin-top: 15px !important; }
  
  .mb10 { margin-bottom: 8px !important; }
  .mb15 { margin-bottom: 10px !important; }
  .mb20 { margin-bottom: 12px !important; }
  
  .p10 { padding: 8px !important; }
  .p15 { padding: 10px !important; }
  .p20 { padding: 12px !important; }
}

@media (max-width: 480px) {
  .mt10 { margin-top: 6px !important; }
  .mt15 { margin-top: 8px !important; }
  .mt20 { margin-top: 10px !important; }
  .mt30 { margin-top: 12px !important; }
  
  .mb10 { margin-bottom: 6px !important; }
  .mb15 { margin-bottom: 8px !important; }
  .mb20 { margin-bottom: 10px !important; }
  
  .p10 { padding: 6px !important; }
  .p15 { padding: 8px !important; }
  .p20 { padding: 10px !important; }
}

/* Logout button responsive */
@media (max-width: 768px) {
  #logout-btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    min-height: 44px;
  }
}

