/* Mobile styles for customer pages */

/* Only apply these styles on mobile devices */
@media (max-width: 767px) {
    /* Basic layout adjustments */
    body {
        padding-bottom: 60px; /* Space for the bottom navigation */
    }

    /* Adjust container */
    .container {
        padding: 0 10px;
        max-width: 100%;
        padding-bottom: 10px;
    }

    /* Adjust navbar */
    .navbar {
        padding: 0.5rem 1rem;
        margin-bottom: 0; /* Remove any bottom margin */
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    /* Remove top margin from main content */
    main {
        padding-bottom: 70px;
        margin-top: 0 !important; /* Override any margin-top */
    }
    
    /* Override Bootstrap mt-5 class on mobile */
    main .container.mt-5,
    main .container .mt-5,
    main .mt-5,
    .mt-5 {
        margin-top: 0.5rem !important;
    }
    
    /* Fix white space between navbar and content */
    main:empty {
        display: none;
    }
    
    /* Adjust top margin for container inside main */
    main .container {
        margin-top: 10px;
    }
    
    /* Adjust dashboard title spacing */
    .dashboard-title {
        margin-top: 10px;
        margin-bottom: 5px;
        font-size: 1.5rem;
    }
    
    .welcome-message {
        margin-bottom: 15px;
    }

    /* Hide desktop navigation */
    .navbar-nav {
        display: none !important;
    }

    /* Adjust cards */
    .card {
        margin-bottom: 15px;
        border-radius: 10px;
    }

    .card-header {
        padding: 12px 15px;
    }

    .card-body {
        padding: 15px;
    }

    /* Adjust tables */
    .table {
        font-size: 0.9rem;
    }

    .table td, .table th {
        padding: 8px;
    }

    /* Adjust buttons */
    .btn {
        padding: 0.375rem 0.75rem;
    }

    /* Adjust forms */
    .form-control {
        font-size: 0.9rem;
        padding: 0.375rem 0.75rem;
    }

    /* Mobile bottom navigation */
    .mobile-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: var(--background-light);
        box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
        z-index: 1000;
        border-top: 1px solid #eee;
    }

    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 0.7rem;
        padding: 5px 0;
    }

    .mobile-nav-item.active {
        color: var(--primary-color);
    }

    .mobile-nav-item i {
        font-size: 1.2rem;
        margin-bottom: 2px;
    }

    /* Dashboard adjustments */
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }

    .col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, 
    .col-7, .col-8, .col-9, .col-10, .col-11, .col-12, 
    .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, 
    .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12, 
    .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, 
    .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Quick actions adjustments */
    .quick-actions .btn {
        margin-bottom: 10px;
    }

    /* Modal adjustments */
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-content {
        border-radius: 10px;
    }

    /* Chat adjustments */
    .chat-container {
        height: calc(100vh - 120px);
    }

    .chat-messages {
        height: calc(100vh - 220px);
    }

    /* Mobile table list */
    .mobile-table-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .mobile-table-item {
        background-color: #fff;
        border-radius: 10px;
        padding: 15px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        position: relative;
    }

    .mobile-table-item .badge {
        position: absolute;
        top: 15px;
        right: 15px;
    }

    .mobile-table-item h6 {
        margin-bottom: 10px;
        font-weight: 600;
    }

    .mobile-table-item .item-details {
        display: flex;
        flex-direction: column;
        gap: 5px;
        margin-top: 10px;
    }

    .mobile-table-item .item-detail {
        display: flex;
        justify-content: space-between;
    }

    .mobile-table-item .item-detail-label {
        font-weight: 500;
        color: var(--text-secondary);
    }

    .mobile-table-item .item-actions {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        margin-top: 15px;
    }

    /* App-like quick actions */
    .app-actions {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        margin: 15px 0 20px;
    }
    
    .app-action-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background-color: #fff;
        border-radius: 12px;
        padding: 12px 5px;
        text-decoration: none;
        color: var(--text-primary);
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        text-align: center;
    }
    
    .app-action-btn i {
        font-size: 1.5rem;
        color: var(--primary-color);
        margin-bottom: 8px;
    }
    
    .app-action-btn span {
        font-size: 0.7rem;
        font-weight: 500;
    }
    
    /* Dashboard cards */
    .dashboard-card {
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        border: none;
    }
    
    .dashboard-card .card-header {
        background-color: #fff;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .dashboard-card .toggle-icon {
        transition: transform 0.3s ease;
    }
    
    /* Ensure footer doesn't overlap with mobile nav */
    footer {
        margin-bottom: 60px;
    }
}

/* Desktop styles for app-like interface */
@media (min-width: 768px) {
    /* Hide mobile-only bottom navigation */
    .mobile-nav {
        display: none !important;
    }
    
    /* App-like quick actions for desktop - horizontal layout */
    .app-actions-desktop {
        margin: 20px 0 30px;
    }
    
    .app-action-btn-desktop {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        background-color: #fff;
        border-radius: 8px;
        padding: 12px 15px;
        text-decoration: none;
        color: var(--text-primary);
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        transition: all 0.3s ease;
        height: 100%;
    }
    
    .app-action-btn-desktop:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
        color: var(--primary-color);
    }
    
    .app-action-btn-desktop i {
        font-size: 1.2rem;
        color: var(--primary-color);
        margin-right: 8px;
        flex-shrink: 0;
    }
    
    .app-action-btn-desktop span {
        font-size: 0.9rem;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
