/* =========================
   GLOBAL RESPONSIVE SYSTEM
========================= */

html {
    scroll-behavior: smooth;
}

* {
    -webkit-tap-highlight-color: transparent;
}

body,
body * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

input,
textarea,
select,
option,
[contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

::selection {
    background: transparent;
    color: inherit;
}

input::selection,
textarea::selection {
    background: rgba(13, 110, 253, .25);
    color: inherit;
}

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    background: rgba(15, 23, 42, .06);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mail-btn {
    position: relative;
}

.mail-btn .bi {
    line-height: 1;
}

.mail-btn .bi::before {
    display: inline-block;
}

.mail-btn .bi:empty::before,
.mail-btn .bi:not([class*="bi-"])::before {
    content: "\2709";
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
}

.container,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl {
    width: 100%;
}

/* Form aman di mobile */
input,
select,
textarea,
button {
    max-width: 100%;
}

/* Tombol agar tidak mepet */
.btn {
    white-space: normal;
}

/* Card dan box */
.trip-card,
.feature-card,
.help-box,
.recommend-box,
.history-card,
.detail-card,
.booking-card,
.side-card,
.summary-box,
.section-box,
.table-box,
.form-box,
.stats-card,
.dashboard-card {
    width: 100%;
}

/* Navbar collapse spacing */
@media (max-width: 991.98px) {
    .navbar-nav {
        gap: 8px;
    }

    .navbar .btn {
        width: 100%;
    }

    .navbar .nav-link {
        display: block;
        width: 100%;
    }
}

/* Tablet */
@media (max-width: 991.98px) {
    .hero,
    .hero-section,
    .admin-hero,
    .history-hero {
        padding-top: 90px !important;
        padding-bottom: 60px !important;
    }

    .hero h1,
    .hero-title,
    .admin-hero h1,
    .history-hero h1 {
        font-size: 2.2rem !important;
        line-height: 1.25 !important;
    }

    .section-title {
        font-size: 1.9rem !important;
    }

    .detail-card img,
    .trip-card img,
    .history-card img {
        height: 240px !important;
    }

    .info-grid,
    .meta-grid,
    .trip-meta,
    .history-meta {
        grid-template-columns: 1fr !important;
    }

    .hero-mini {
        gap: 12px !important;
    }

    .hero-mini .item {
        min-width: 150px !important;
        flex: 1 1 calc(50% - 12px);
    }
}

/* HP */
@media (max-width: 767.98px) {
    body {
        font-size: 15px;
    }

    .hero,
    .hero-section,
    .admin-hero,
    .history-hero {
        padding-top: 80px !important;
        padding-bottom: 50px !important;
    }

    .hero h1,
    .hero-title,
    .admin-hero h1,
    .history-hero h1 {
        font-size: 1.9rem !important;
        line-height: 1.3 !important;
    }

    .hero p,
    .hero-text,
    .admin-hero p,
    .history-hero p,
    .section-subtitle {
        font-size: 0.95rem !important;
    }

    .section-title {
        font-size: 1.6rem !important;
    }

    .trip-title {
        font-size: 1.3rem !important;
    }

    .trip-card img,
    .detail-card img,
    .history-card img {
        height: 210px !important;
    }

    .detail-body,
    .booking-card,
    .help-card,
    .form-box,
    .table-box,
    .section-box,
    .summary-box,
    .dashboard-card .card-body,
    .stats-card .card-body {
        padding: 18px !important;
    }

    .auth-left,
    .auth-right {
        padding: 24px !important;
    }

    .auth-title {
        font-size: 1.6rem !important;
    }

    .price-box,
    .dashboard-number,
    .summary-value,
    .stats-number {
        font-size: 1.6rem !important;
    }

    .floating-contact {
        right: 14px !important;
        bottom: 14px !important;
        gap: 10px !important;
    }

    .floating-contact a {
        width: 52px !important;
        height: 52px !important;
        font-size: 1.3rem !important;
    }

    .btn-lg {
        padding: 10px 14px !important;
        font-size: 1rem !important;
    }

    .hero-mini .item {
        flex: 1 1 100%;
        min-width: 100% !important;
    }
}

/* HP kecil */
@media (max-width: 575.98px) {
    .container {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .hero h1,
    .hero-title,
    .admin-hero h1,
    .history-hero h1 {
        font-size: 1.7rem !important;
    }

    .section-title {
        font-size: 1.45rem !important;
    }

    .trip-card img,
    .detail-card img,
    .history-card img {
        height: 190px !important;
    }

    .trip-title {
        font-size: 1.2rem !important;
    }

    .navbar-brand {
        font-size: 1.6rem !important;
    }

    .table th,
    .table td {
        font-size: 13px;
        white-space: nowrap;
    }
}

/* Practical mobile polish */
.detail-card,
.side-card,
.booking-card,
.help-card,
.summary-box,
.section-box,
.table-box,
.form-box,
.dashboard-card,
.stats-card,
.history-card{
    border-radius:18px !important;
    box-shadow:0 10px 26px rgba(15,23,42,.08) !important;
}

.hero,
.hero-section,
.history-hero,
.admin-hero,
.page-hero{
    background-blend-mode:multiply;
}

.action-row,
.payment-action-form,
.copy-row,
.footer-contact{
    min-width:0;
}

.table-responsive{
    border-radius:14px;
}

.table{
    margin-bottom:0;
}

@media (max-width: 991.98px) {
    .navbar-collapse{
        max-height:calc(100svh - 84px);
        overflow-y:auto;
    }

    .hero,
    .hero-section,
    .history-hero,
    .admin-hero,
    .page-hero{
        min-height:auto !important;
    }

    .detail-section-grid,
    .info-grid,
    .meta-grid,
    .history-meta{
        grid-template-columns:1fr !important;
    }
}

@media (max-width: 767.98px) {
    .hero,
    .hero-section,
    .history-hero,
    .admin-hero,
    .page-hero{
        padding-top:72px !important;
        padding-bottom:42px !important;
    }

    .detail-card,
    .side-card,
    .booking-card,
    .help-card,
    .summary-box,
    .section-box,
    .table-box,
    .form-box,
    .dashboard-card,
    .stats-card,
    .history-card{
        border-radius:16px !important;
    }

    .detail-card img,
    .trip-card img,
    .history-card img{
        height:200px !important;
    }

    .seat-picker-head,
    .bank-detail-row,
    .action-row,
    .form-head{
        align-items:stretch !important;
        flex-direction:column !important;
    }

    .payment-pill,
    .seat-count-pill{
        width:max-content;
        max-width:100%;
    }

    .btn,
    .copy-account-btn{
        min-height:40px;
    }

    .table-box,
    .section-box,
    .form-box{
        overflow:hidden;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand{
        font-size:1.35rem !important;
    }

    .hero h1,
    .hero-title,
    .admin-hero h1,
    .history-hero h1,
    .page-hero h1{
        font-size:1.65rem !important;
    }

    .hero p,
    .hero-text,
    .admin-hero p,
    .history-hero p,
    .page-hero p{
        line-height:1.65 !important;
    }

    .detail-body,
    .booking-card,
    .help-card,
    .form-box,
    .table-box,
    .section-box,
    .summary-box,
    .dashboard-card .card-body,
    .stats-card .card-body{
        padding:14px !important;
    }

    /* Fix: info-item uses flexbox — icon is a flex child, no absolute positioning needed */
    .info-item,
    .meta-item,
    .summary-item,
    .detail-panel{
        border-radius:11px !important;
        padding:10px !important;
    }

    .price-box,
    .dashboard-number,
    .summary-value,
    .stats-number{
        font-size:1.45rem !important;
        overflow-wrap:anywhere;
    }

    .seat-legend{
        display:grid !important;
        grid-template-columns:1fr 1fr;
        gap:8px !important;
    }

    .bus-layout{
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
    }

    .bus-front,
    .bus-seat-row{
        min-width:300px;
    }

    .qris-image{
        width:min(100%, 260px) !important;
        margin-left:auto !important;
        margin-right:auto !important;
    }
}
