/**
 * Mobile Responsive Styles for ScamSentinel Dashboard
 */

/* Mobile breakpoints */
@media screen and (max-width: 768px) {
    /* Dashboard header adjustments */
    .dashboard-header {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }
    
    .header-logo h1 {
        font-size: 1.4rem;
    }
    
    .header-logo img {
        height: 30px;
    }
    
    .header-user {
        font-size: 0.875rem;
        gap: 0.5rem;
    }
    
    .header-user span {
        display: none; /* Hide username on mobile */
    }
    
    /* Main dashboard padding */
    .dashboard-main {
        padding: 1rem;
    }
    
    /* View header adjustments */
    .view-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        margin-bottom: 1rem;
    }
    
    .view-header h2 {
        font-size: 1.5rem;
    }
    
    .view-filters {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .filter-select, .filter-input {
        width: 100%;
        font-size: 0.875rem;
    }
    
    /* Transform table to card layout on mobile */
    .call-table {
        background: transparent;
        border: none;
    }
    
    .call-table-header {
        display: none; /* Hide header on mobile */
    }
    
    .call-table-row {
        display: block;
        background: rgba(30, 41, 59, 0.8);
        border-radius: 8px;
        padding: 1rem;
        margin-bottom: 1rem;
        border: 1px solid #334155;
        position: relative;
    }
    
    .call-table-row > div {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(71, 85, 105, 0.3);
    }
    
    .call-table-row > div:last-child {
        border-bottom: none;
    }
    
    /* Add labels for mobile card view */
    .call-table-row > div::before {
        content: attr(data-label);
        font-weight: 600;
        color: #94a3b8;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.025em;
    }
    
    /* Risk and status badges on mobile */
    .risk-badge, .status-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
    
    /* Action buttons on mobile */
    .btn-view-transcript {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.875rem;
        margin-top: 0.5rem;
    }
    
    /* Pagination on mobile */
    .pagination {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    
    .pagination button {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Live transcription view mobile */
    .transcription-container {
        padding: 1rem;
    }
    
    .transcript-area {
        max-height: 400px;
        font-size: 0.875rem;
    }
    
    .transcript-controls {
        flex-wrap: wrap;
    }
    
    .transcript-controls .btn {
        flex: 1;
        min-width: 100px;
    }
    
    /* Back button mobile */
    .btn-back {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Connection status mobile */
    .connection-status {
        font-size: 0.875rem;
    }
    
    /* Scam analysis mobile */
    .scam-analysis {
        padding: 1rem;
    }
    
    .scam-analysis h3 {
        font-size: 1.2rem;
    }
}

/* Small mobile devices */
@media screen and (max-width: 480px) {
    .dashboard-header {
        padding: 0.5rem;
    }
    
    .header-logo h1 {
        font-size: 1.2rem;
    }
    
    .dashboard-main {
        padding: 0.75rem;
    }
    
    .view-header h2 {
        font-size: 1.25rem;
    }
    
    .call-table-row {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    .btn-logout {
        padding: 0.4rem 0.8rem;
        font-size: 0.875rem;
    }
}

/* Landscape mobile adjustments */
@media screen and (max-width: 896px) and (orientation: landscape) {
    .dashboard-header {
        padding: 0.5rem 1rem;
    }
    
    .transcript-area {
        max-height: 250px;
    }
    
    .view-header {
        margin-bottom: 0.75rem;
    }
}

/* Touch-friendly adjustments for all mobile devices */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch target sizes */
    .btn, button, .btn-view-transcript, .btn-logout, .btn-back {
        min-height: 44px;
        min-width: 44px;
    }
    
    .filter-select, .filter-input {
        min-height: 44px;
    }
    
    /* Remove hover effects on mobile */
    .call-table-row:hover {
        background: rgba(30, 41, 59, 0.8);
    }
    
    .btn:hover, button:hover {
        transform: none;
    }
}

/* High resolution mobile screens */
@media screen and (min-resolution: 2dppx) and (max-width: 768px) {
    /* Crisp borders for retina displays */
    .call-table-row {
        border-width: 0.5px;
    }
    
    .risk-badge, .status-badge {
        border-width: 0.5px;
    }
}

/* iOS safe area adjustments */
@supports (padding-top: env(safe-area-inset-top)) {
    .dashboard-header {
        padding-top: max(1rem, env(safe-area-inset-top));
    }
    
    .dashboard-main {
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
}