/**
 * Storefront Responsive Styles
 * Mobile-first approach for customer-facing pages
 */

/* Prevent the points badge pill from ever wrapping its text */
/* Note: Bootstrap .badge already applies white-space: nowrap */

/* Mobile adjustments for storefront */
@media (max-width: 991.98px) {
    body {
        padding: 15px;
    }

    .card {
        margin: 0 auto;
    }

    .store-header {
        padding: 20px;
    }

    .store-logo {
        max-width: 120px;
        max-height: 60px;
    }

    .store-name {
        font-size: 1.5rem;
    }

    .store-tagline {
        font-size: 1rem;
    }

    .balance-card {
        padding: 30px 20px;
        margin-bottom: 20px;
    }

    .balance-number {
        font-size: 48px;
    }

    .balance-label {
        font-size: 16px;
    }

    .home-link {
        top: 10px;
        left: 10px;
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .card-body {
        padding: 20px !important;
    }
}

@media (max-width: 767.98px) {
    body {
        padding: 10px;
        align-items: flex-start;
    }

    .store-header {
        padding: 15px;
    }

    .store-name {
        font-size: 1.3rem;
    }

    .store-tagline {
        font-size: 0.9rem;
    }

    .balance-card {
        padding: 25px 15px;
        border-radius: 15px;
    }

    .balance-number {
        font-size: 40px;
    }

    .balance-label {
        font-size: 14px;
    }

    /* Reward cards: reduce padding on tablet/mobile */
    .reward-card {
        padding: 15px;
    }

    /* Forms */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 15px;
    }

    .card-body {
        padding: 15px !important;
    }

    /* Section titles */
    .section-title {
        font-size: 1.1rem;
    }

    .section-title i {
        font-size: 22px !important;
    }

    /* Transaction items */
    .transaction-item {
        padding: 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    body {
        padding: 5px;
    }

    .home-link {
        top: 5px;
        left: 5px;
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .store-header {
        padding: 12px;
    }

    .store-logo {
        max-width: 100px;
        max-height: 50px;
    }

    .store-name {
        font-size: 1.1rem;
    }

    .balance-card {
        padding: 20px 12px;
        border-radius: 12px;
    }

    .balance-number {
        font-size: 36px;
    }

    .card {
        border-radius: 15px;
    }

    /* Redemption code box */
    .alert .h5 {
        font-size: 1rem;
    }

    .alert div[style*="font-size: 24px"] {
        font-size: 18px !important;
        padding: 15px !important;
    }

    /* Small adjustments */
    h5, .h5 {
        font-size: 1rem;
    }

    h6, .h6 {
        font-size: 0.9rem;
    }

    .text-muted.small, small.text-muted {
        font-size: 0.8rem;
    }

    /* Reward image goes full-width when card stacks vertically (xs only) */
    .reward-image,
    .reward-image-placeholder {
        width: 100%;
        height: 150px;
    }
}

/* Landscape mobile */
@media (max-width: 767.98px) and (orientation: landscape) {
    body {
        padding: 10px;
    }

    .balance-card {
        padding: 20px;
    }

    .balance-number {
        font-size: 36px;
    }

    .reward-card {
        flex-direction: row;
    }

    .reward-image,
    .reward-image-placeholder {
        width: 100px;
        height: 100px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 48px;
        padding: 12px 24px;
    }

    .form-control, .form-select {
        min-height: 48px;
    }

    .reward-card {
        cursor: pointer;
    }
}
