/**
 * Veterinary Clinic Case Management - Modern Redesign v2
 * Fixed: Time display, view popup, spacing, container shrinking
 * Version: 2.0
 */

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
    /* Colors */
    --primary: #007AFF;
    --primary-hover: #0051D5;
    --primary-light: #E8F4FF;
    --success: #34C759;
    --warning: #FF9500;
    --danger: #FF3B30;
    --info: #5AC8FA;
    
    /* Neutrals */
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #E5E5E5;
    --gray-300: #D4D4D4;
    --gray-400: #A3A3A3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    
    /* Background */
    --bg-primary: #FFFFFF;
    --bg-secondary: #FAFAFA;
    --bg-tertiary: #F5F5F5;
    
    /* Text */
    --text-primary: #171717;
    --text-secondary: #525252;
    --text-tertiary: #A3A3A3;
    --text-inverse: #FFFFFF;
    
    /* Borders */
    --border: #E5E5E5;
    --border-light: #F5F5F5;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* Spacing - Reduced */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 24px;
    --space-2xl: 32px;
    
    /* Typography */
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', Monaco, Consolas, monospace;
    
    /* Transitions */
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-index */
    --z-modal: 10000;
}



/* Increase font sizes for better readability */
.vet-case-label {
    font-size: 13px !important;
}

.vet-case-value {
    font-size: 14px !important;
}

.vet-case-id-value {
    font-size: 12px !important;
    padding: 3px 10px !important;
}

.vet-case-status-compact,
.vet-visit-type-badge {
    font-size: 12px !important;
    padding: 3px 10px !important;
}

/* Verification badge also needs larger font */
.vet-verification-badge-compact {
    font-size: 11px !important; /* Increase from 9px */
    padding: 2px 8px !important;
}

/* ============================================
   RESET
   ============================================ */
.vet-dashboard-wrapper *,
.vet-all-cases-wrapper *,
.vet-popup * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ============================================
   MAIN WRAPPERS - NO CONTAINER IN CONTAINER
   ============================================ */
.vet-dashboard-wrapper,
.vet-all-cases-wrapper {
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg-secondary);
    padding: 0 !important;
    margin-bottom: 50px !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* ============================================
   HEADER
   ============================================ */
.vet-dashboard-header {
    background: var(--bg-primary);
    padding: var(--space-xl);
    margin: 0 0 var(--space-lg) 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.vet-dashboard-header h2 {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
}

.vet-dashboard-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.vet-dashboard-header strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ============================================
   BUTTONS - Modern Apple Style
   ============================================ */
.vet-btn,
.vet-btn-primary,
.vet-btn-secondary,
.vet-btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font);
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    padding: 10px 18px;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
    outline: none;
}
@media (max-width: 768px) {
#vet-add-case-btn {
    position: fixed !important;
    bottom: 0px !important;
    left: 0px !important;
    right: 0px !important;
    padding: 20px !important; /* Added padding */
    font-size: 18px !important; /* Bigger text */
    height: 10px !important; /* Fixed height */
    background-color: #007bff !important; /* Make it stand out */
    color: white !important;
    border: none !important;
    cursor: pointer !important;
    z-index: 1000 !important; /* Ensure it's on top */
}
}
.vet-btn-primary,
#vet-add-case-btn {
    background: var(--primary);
    color: var(--text-inverse);
}

.vet-btn-primary:hover,
#vet-add-case-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.vet-btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.vet-btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.vet-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.vet-btn-sm:hover {
    background: var(--gray-50);
}

.vet-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vet-btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    padding: 0;
    cursor: pointer;
}

.vet-btn-link:hover {
    color: var(--primary-hover);
}

/* ============================================
   SEARCH & FILTER BAR
   ============================================ */
/* ============================================
   SEARCH & FILTER BAR - RESPONSIVE ONE-LINE LAYOUT
   ============================================ */
.vet-search-filter-bar {
    background: var(--bg-primary);
    padding: var(--space-lg);
    margin: 0 var(--space-lg) var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: var(--space-md);
    align-items: center;
    flex-wrap: nowrap; /* Changed from wrap to nowrap */
    overflow: hidden; /* Prevent overflow from breaking layout */
}

.vet-search-container {
    flex: 1;
    min-width: 250px; /* Reduced from 250px */
    max-width: calc(100% - 160px); /* Limit width to leave space for buttons */
}

/* Container for filter button and clear button */
.vet-filter-controls {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
    flex-shrink: 0; /* Prevent shrinking */
}

.vet-filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    flex-shrink: 0; /* Prevent shrinking */
}








.vet-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
}

.vet-search-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all var(--transition);
    outline: none;
}

.vet-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.vet-filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
}

.vet-filter-toggle-btn:hover {
    background: var(--gray-50);
}

.vet-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
}

/* ============================================
   NOTIFICATIONS - Compact Modern Design
   ============================================ */
.vet-notifications-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin: 0 var(--space-lg) var(--space-lg);
}

.vet-notification-box {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    border-left: 3px solid;
}

.vet-notification-box h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 var(--space-md) 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vet-notification-warning {
    border-left-color: var(--warning);
}

.vet-notification-warning h3 {
    color: var(--warning);
}

.vet-notification-info {
    border-left-color: var(--info);
}

.vet-notification-info h3 {
    color: var(--info);
}

.vet-notification-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.vet-notification-item {
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    font-size: 13px;
    line-height: 1.5;
}

.vet-reminder-content {
    flex: 1;
    min-width: 0;
}

.vet-reminder-content strong {
    font-family: var(--font-mono);
    color: var(--primary);
    font-size: 12px;
}

.vet-reminder-note {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    font-style: italic;
    margin-top: 4px;
}

.vet-notification-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.vet-show-all {
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
    margin: var(--space-sm) 0 0 0;
}

/* ============================================
   EMPTY STATES
   ============================================ */
.vet-no-notifications,
.vet-empty {
    text-align: center;
    padding: var(--space-2xl) var(--space-xl);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin: 0 var(--space-lg) var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.vet-no-notifications h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}

.vet-no-notifications p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}



.vet-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

/* ============================================
   CASE CARD - COMPACT DESIGN OPTIMIZATION
   ============================================ */

.vet-case-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.vet-case-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-xs);
}

.vet-case-id {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
    background: var(--primary-light);
    padding: 3px 8px;
    border-radius: var(--radius-md);
}

/* ============================================
   CASE INFO - LEFT-RIGHT PAIRED LAYOUT
   ============================================ */

.vet-case-info-compact {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin: var(--space-xs) 0;
    padding: var(--space-xs) 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

/* Each row with left-right content */
.vet-case-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 24px;
    padding: 2px 0;
}

/* Left side container */
.vet-case-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

/* Right side container */
.vet-case-right {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    flex: 1;
    min-width: 0;
    text-align: right;
}

/* Label styling */
.vet-case-label {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 11px;
    flex-shrink: 0;
}

/* Value styling */
.vet-case-value {
    color: var(--text-secondary);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Special styling for IDs */
.vet-case-id-value {
    font-family: var(--font-mono);
    color: black;
    font-size: 11px;
    font-weight: 600;
  
    padding: 1px 6px;
    border-radius: var(--radius-sm);
}

/* Status badge in right column */
.vet-case-right .vet-case-status-compact {
    margin-left: 4px;
    font-size: 9px;
    padding: 1px 6px;
}

/* Visit type badge in left column */
.vet-case-left .vet-visit-type-badge {
    font-size: 9px;
    padding: 1px 6px;
}





/* Status Badge Compact */
.vet-case-status-compact {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.vet-case-status-compact.status-open {
    background: rgba(52, 199, 89, 0.1);
    color: var(--success);
}

.vet-case-status-compact.status-under_treatment {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary);
}

.vet-case-status-compact.status-closed {
    background: rgba(163, 163, 163, 0.1);
    color: var(--gray-600);
}

.vet-case-status-compact.status-dead {
    background: rgba(255, 59, 48, 0.1);
    color: var(--danger);
}

/* Visit Type Badge */
.vet-visit-type-badge {
    padding: 2px 8px;
    border-radius: var(--radius-md);
    font-size: 10px;
    font-weight: 400;
   
    color: black;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* Case Actions - Single Line Layout */
.vet-case-actions-compact {
    display: flex;
    gap: 4px;
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
    justify-content: space-between;
}

.vet-case-actions-compact .vet-btn-sm {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: var(--radius-md);
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 26px;
}

/* WhatsApp button compact */
.vet-btn-whatsapp-compact {
    background: #25D366 !important;
    color: white !important;
    border: none;
    font-size: 11px !important;
    padding: 4px 8px !important;
}

.vet-btn-whatsapp-compact .dashicons {
    font-size: 12px !important;
    width: 12px !important;
    height: 12px !important;
}

/* Verification Badge Compact */
.vet-verification-badge-compact {
    font-size: 9px;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vet-verification-badge-compact.pending {
    background: rgba(255, 149, 0, 0.1);
    color: var(--warning);
}

.vet-verification-badge-compact.verified {
    background: rgba(52, 199, 89, 0.1);
    color: var(--success);
}


/* Responsive Adjustments */
@media (max-width: 639px) {
    .vet-case-info-compact {
        grid-template-columns: 1fr;
        gap: var(--space-xs);
    }
    
    .vet-case-actions-compact {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .vet-case-actions-compact .vet-btn-sm {
        flex: 1;
        min-width: 70px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .vet-case-info-compact {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   LOADING
   ============================================ */
.vet-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    gap: var(--space-lg);
}

.vet-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.vet-loading p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============================================
   MESSAGES
   ============================================ */
.vet-message {
    position: fixed;
    top: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: calc(var(--z-modal) + 100);
    max-width: 500px;
    width: calc(100% - 32px);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.vet-message.success {
    background: var(--success);
    color: white;
}

.vet-message.error {
    background: var(--danger);
    color: white;
}

.vet-message.info {
    background: var(--primary);
    color: white;
}

/* ============================================
   POPUPS - FULL SCREEN MODERN DESIGN
   ============================================ */
.vet-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-modal);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow-y: auto;
    padding: 0;
}

.vet-popup.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.vet-popup-content {
    background: var(--bg-primary);
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Desktop: Centered Modal */
@media (min-width: 768px) {
    .vet-popup {
        padding: var(--space-xl);
        align-items: center;
    }
    
    .vet-popup-content {
        max-width: 900px;
        min-height: auto;
        max-height: 90vh;
        border-radius: var(--radius-xl);
        box-shadow: var(--shadow-xl);
    }
    
    .vet-filter-popup-content {
        max-width: 500px;
    }
}

/* Popup Header - Sticky */
.vet-popup-header {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border);
    background: var(--bg-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.vet-popup-header h2 {
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.vet-popup-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-full);
    font-size: 20px;
    line-height: 1;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
}

.vet-popup-close:hover {
    background: var(--gray-200);
    color: var(--text-primary);
}

/* Popup Body - Reduced Padding */
.vet-popup-body {
    padding: var(--space-lg);
    overflow-y: auto;
    flex: 1;
    background: var(--bg-secondary);
}
/* ============================================
   VIEW CASE POPUP - UPDATED SELECTORS
   ============================================ */

#vet-view-popup .vet-popup-body {
    padding: 0;
    background: var(--bg-secondary);
}

/* Main Info Section - FIXED to match JavaScript */
.vet-view-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    padding: var(--space-xl);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.vet-view-header h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: white;
    flex: 1;
}

.vet-view-badges {
    display: flex;
    gap: var(--space-sm);
}

/* View Sections - FIXED to match JavaScript */
.vet-view-section {
    background: var(--bg-primary);
    margin: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.vet-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
}

.vet-collapsible-header {
    cursor: pointer;
    user-select: none;
    transition: background var(--transition);
}

.vet-collapsible-header:hover {
    background: var(--bg-secondary);
}

.vet-collapse-icon {
    font-size: 12px;
    transition: transform var(--transition);
}

.vet-collapsible-content {
    padding: 0 var(--space-lg) var(--space-lg);
}

/* Info Grid - FIXED */
.vet-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    padding: var(--space-lg);
}

.vet-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vet-full-width {
    grid-column: 1 / -1;
}

.vet-info-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.vet-info-value {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.4;
}

.vet-info-value strong {
    font-weight: 700;
}

/* Medical Subsections - FIXED */
.vet-medical-subsection {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
}

.vet-medical-subsection:last-child {
    border-bottom: none;
}

.vet-subsection-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-md) 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vet-text-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    white-space: pre-line;
}

/* Vaccine Box - FIXED */
.vet-vaccine-box {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    border: 1px solid var(--border);
}

.vet-vaccine-box:last-child {
    margin-bottom: 0;
}

.vet-vaccine-box h6 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-md) 0;
}

/* Images Grid - FIXED */
.vet-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.vet-image-item {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform var(--transition);
}

.vet-image-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.vet-image-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.vet-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.vet-image-item:hover .vet-thumbnail {
    transform: scale(1.05);
}

.vet-pdf-link {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--danger);
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    flex-direction: column;
    gap: 4px;
}

/* Medical History Timeline - FIXED */
.vet-history-timeline {
    padding: var(--space-lg);
}

.vet-history-item {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all var(--transition);
}

.vet-history-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border);
}

.vet-history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--space-md);
    gap: var(--space-md);
}

.vet-history-date {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 100px;
}

.vet-history-day {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.vet-history-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.vet-history-info {
    flex: 1;
    min-width: 0;
}

.vet-history-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: 4px;
}

.vet-history-case-id {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-mono);
}

.vet-history-type {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.vet-history-summary {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.vet-history-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.vet-btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.vet-btn-icon:hover {
    background: var(--gray-100);
    color: var(--text-primary);
    border-color: var(--gray-300);
}

.vet-history-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition);
}

.vet-history-toggle:hover {
    background: var(--gray-100);
}

.vet-history-details {
    padding: 0 var(--space-md) var(--space-md);
    border-top: 1px solid var(--border-light);
}

.vet-history-section {
    margin-bottom: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.vet-history-section:last-child {
    margin-bottom: 0;
}

.vet-history-section strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.vet-history-section p,
.vet-history-section div {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.vet-history-section ul {
    padding-left: var(--space-lg);
    margin: var(--space-sm) 0;
}

.vet-history-section li {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2px;
}

/* View Actions - FIXED */
.vet-view-actions {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    position: sticky;
    bottom: 0;
    margin-top: var(--space-lg);
}

.vet-view-actions .vet-btn {
    flex: 1;
    justify-content: center;
    gap: 8px;
}

/* Empty States - FIXED */
.vet-error {
    background: rgba(255, 59, 48, 0.1);
    color: var(--danger);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    margin: var(--space-lg);
    font-weight: 600;
}

.vet-info-message {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin: var(--space-md) 0;
    font-size: 13px;
}

/* Existing Pets Notification - FIXED */
#existing-pets-notification {
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid var(--success);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-top: var(--space-md);
}

.existing-pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    max-height: 350px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
}

.existing-pets-grid::-webkit-scrollbar {
    width: 6px;
}

.existing-pets-grid::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 10px;
}

.existing-pets-grid::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.existing-pets-grid::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.existing-pet-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    border: 1px solid var(--border);
}

.pet-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.pet-species-badge {
    font-size: 10px;
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.pet-card-details {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.pet-card-details .label {
    font-weight: 600;
}

/* Responsive fixes for view popup */
@media (max-width: 768px) {
    .vet-view-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .vet-view-badges {
        justify-content: center;
    }
    
    .vet-info-grid {
        grid-template-columns: 1fr;
    }
    
    .vet-history-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .vet-history-date {
        align-items: flex-start;
    }
    
    .vet-history-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    
}

.vet-view-actions .vet-btn {
    flex: 1;
}

.vet-btn-success {
    background: white;
    color: black;
    border:1px;
    
}

.vet-btn-success:hover {
    background: #2fb550;
}

.vet-btn-danger {
    background: var(--danger);
    color: white;
    border: none;
}

.vet-btn-danger:hover {
    background: #e62f25;
}

/* Case Detail Section (legacy support) */
.vet-case-detail-section {
    background: var(--bg-primary);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
}

.vet-case-detail-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-md) 0;
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--primary);
}

.vet-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.vet-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vet-detail-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vet-detail-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* Status Badges */
.vet-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vet-badge-info {
    background: rgba(90, 200, 250, 0.15);
    color: var(--info);
}

.vet-badge-primary {
    background: rgba(0, 122, 255, 0.15);
    color: var(--primary);
}

.vet-badge-success {
    background: rgba(52, 199, 89, 0.15);
    color: var(--success);
}

.vet-badge-danger {
    background: rgba(255, 59, 48, 0.15);
    color: var(--danger);
}

.vet-badge-warning {
    background: rgba(255, 149, 0, 0.15);
    color: var(--warning);
}

/* ============================================
   FORM STYLES - COMPACT & ORGANIZED
   ============================================ */
.vet-form-step {
    display: none;
}

.vet-form-step.active {
    display: block;
}

.vet-form-step > h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-lg) 0;
}

/* Step Progress */
.vet-step-progress {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border);
}

.vet-step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition);
    cursor: pointer;
}

.vet-step.active {
    background: var(--primary-light);
}

.vet-step-number {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-300);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.vet-step.active .vet-step-number {
    background: var(--primary);
    color: white;
}

.vet-step-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.vet-step.active .vet-step-label {
    color: var(--primary);
}

/* Form Sections - Reduced Spacing */
.vet-form-section {
    background: var(--bg-primary);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.vet-form-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-md) 0;
}

.vet-form-section hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: var(--space-lg) 0;
}

/* Form Grid - Compact */
.vet-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.vet-form-group.vet-full-width {
    grid-column: 1 / -1;
}

/* Form Group */
.vet-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vet-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Input Fields */
.vet-form-group input[type="text"],
.vet-form-group input[type="email"],
.vet-form-group input[type="tel"],
.vet-form-group input[type="number"],
.vet-form-group input[type="date"],
.vet-form-group input[type="time"],
.vet-form-group select,
.vet-form-group textarea,
.vet-filter-select,
.vet-filter-date {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all var(--transition);
    outline: none;
}

.vet-form-group input:focus,
.vet-form-group select:focus,
.vet-form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.vet-form-group textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.vet-form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23737373' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Input Group */
.vet-input-group {
    display: flex;
    gap: var(--space-sm);
}

.vet-input-group input {
    flex: 1;
}

/* Help Text */
.vet-help-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 4px 0 0 0;
}

.vet-field-note {
    font-size: 12px;
    color: var(--info);
    font-weight: 500;
    margin-top: 4px;
}

/* Checkbox */
.vet-checkbox-label,
.vet-filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.vet-checkbox-label:hover,
.vet-filter-checkbox-label:hover {
    background: var(--gray-100);
}

.vet-checkbox-label input[type="checkbox"],
.vet-filter-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Accordion */
.vet-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.vet-accordion-header:hover {
    background: var(--gray-100);
}

.vet-accordion-icon {
    transition: transform var(--transition);
    font-size: 12px;
    color: var(--text-secondary);
}

.vet-accordion-header.active .vet-accordion-icon {
    transform: rotate(-180deg);
}

.vet-accordion-content {
    margin-top: var(--space-md);
}

/* Vaccine Entry */
.vet-vaccine-entry {
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
}

/* Type Sections */
.vet-type-section {
    background: var(--bg-primary);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
}

/* Image Preview */
.vet-image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.vet-image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.vet-image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vet-image-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition);
}

.vet-image-remove:hover {
    background: var(--danger);
}

/* Form Actions */
.vet-form-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

.vet-form-actions .vet-btn {
    flex: 1;
    padding: 12px 20px;
}

/* Filter Styles */
.vet-filter-group {
    margin-bottom: var(--space-md);
}

.vet-filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 6px;
}

.vet-date-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.vet-date-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vet-date-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.vet-filter-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
}

.vet-filter-actions .vet-btn {
    flex: 1;
}

/* ============================================
   FILE INPUT
   ============================================ */
input[type="file"] {
    width: 100%;
    padding: var(--space-md);
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all var(--transition);
}

input[type="file"]:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

/* Mobile Optimized Form Layout */
@media (max-width: 767px) {
    /* Step 1: Owner & Pet Details */
    #step-1 .vet-form-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    /* Make address full width */
    #step-1 .vet-form-group.vet-full-width {
        grid-column: span 2 !important;
    }
    
    /* Make lookup case ID full width */
    .vet-input-group {
        grid-column: span 2 !important;
    }
    
    /* Step 2: Medical Details */
    #step-2 .vet-form-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    /* Full width elements in Step 2 */
    #medical-history,
    #diagnosis,
    #treatment,
    #visit-type,
    #case-status,
    #surgery-name-field,
    #consultation-name-field,
    #other-notes-field {
        grid-column: span 2 !important;
    }
    
    /* Vaccine entries */
    .vet-vaccine-entry .vet-form-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    
    /* Physical exam fields */
    #physical-exam-content .vet-form-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    
    /* Reduce spacing */
    .vet-form-section {
        padding: 12px !important;
        margin-bottom: 12px !important;
    }
    
    .vet-form-group {
        margin-bottom: 4px !important;
    }
    
    /* Smaller inputs */
    .vet-form-group input,
    .vet-form-group select,
    .vet-form-group textarea {
        padding: 8px 10px !important;
        font-size: 14px !important;
    }
    
    /* Smaller labels */
    .vet-form-group label {
        font-size: 12px !important;
        margin-bottom: 2px !important;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 639px) {
    .vet-dashboard-header {
        flex-direction: column;
        align-items: stretch;
        padding: var(--space-lg);
    }
    
    #vet-add-case-btn {
        width: 100%;
    }
    
    
    
    
    
    
    
    .vet-cases-grid {
        grid-template-columns: 1fr;
    }
    
    .vet-notification-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .vet-notification-actions {
        width: 100%;
    }
    
    
    
    .vet-step-progress {
        flex-direction: column;
    }
    
    .vet-form-actions {
        flex-direction: column;
    }
    
    .vet-date-range {
        grid-template-columns: 1fr;
    }
    
    .vet-popup-body {
        padding: var(--space-md);
    }
    
    .vet-form-section,
    .vet-type-section {
        padding: var(--space-md);
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .vet-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .vet-cases-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   UTILITY
   ============================================ */
.vet-hidden {
    display: none !important;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.vet-btn:focus-visible,
.vet-popup-close:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

























/* WhatsApp Button Styles */
/* ADD THIS TO YOUR MAIN CSS FILE (case-management.css or dashboard.css) */

.vet-btn-whatsapp {
    background: #25D366 !important;
    color: white !important;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.vet-btn-whatsapp:hover {
    background: #20BA5A !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.vet-btn-whatsapp:active {
    transform: translateY(0);
}

.vet-btn-whatsapp:disabled {
    background: #95E1B5 !important;
    cursor: not-allowed;
    transform: none;
}

.vet-btn-whatsapp .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.vet-btn-whatsapp .dashicons-whatsapp {
    color: white;
}

/* Spinning animation for loading state */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.dashicons.spin {
    animation: spin 1s linear infinite;
}

/* Optional: Add WhatsApp icon if dashicons-whatsapp not available */
.vet-btn-whatsapp::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 4px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .vet-btn-whatsapp {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .vet-btn-whatsapp .dashicons {
        font-size: 14px;
        width: 14px;
        height: 14px;
    }
}

/* Success/Error message styling */
.whatsapp-notification {
    position: fixed;
    top: 32px;
    right: 20px;
    padding: 15px 20px;
    background: #25D366;
    color: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.whatsapp-notification.error {
    background: #dc3545;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}












/* Modern App-like Pagination */
.vet-pagination-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    margin-top: 20px;
    margin-bottom: 60px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(10px);
}

/* Pagination Info - Modern */
.vet-pagination-info {
    text-align: center;
    color: #64748b;
    font-weight: 500;
    padding: 4px 0;
    font-size: 13px;
    letter-spacing: 0.2px;
    opacity: 0.9;
}

/* Pagination Controls */
.vet-pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Modern Buttons */
.vet-pagination-btn,
.vet-pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    color: #475569;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 40px;
    height: 40px;
    text-decoration: none;
    user-select: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.vet-pagination-btn:hover:not(:disabled),
.vet-pagination-page:hover:not(.active) {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.vet-pagination-btn:active:not(:disabled),
.vet-pagination-page:active:not(.active) {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.vet-pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f1f5f9;
    transform: none !important;
    box-shadow: none !important;
}

/* Previous/Next Buttons - Modern */
.vet-pagination-prev svg,
.vet-pagination-next svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.vet-pagination-prev {
    padding-left: 12px;
    padding-right: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.vet-pagination-next {
    padding-left: 16px;
    padding-right: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.vet-pagination-prev svg {
    margin-right: 6px;
}

.vet-pagination-next svg {
    margin-left: 6px;
}

/* Active Page - Modern Gradient */
.vet-pagination-page.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: transparent;
    color: #ffffff;
    cursor: default;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
    position: relative;
    overflow: hidden;
}

.vet-pagination-page.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

/* Page Numbers Container */
.vet-pagination-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(241, 245, 249, 0.5);
    padding: 4px;
    border-radius: 10px;
}

/* Modern Ellipsis */
.vet-pagination-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 40px;
    color: #94a3b8;
    font-size: 18px;
    font-weight: 300;
    padding: 0 4px;
    user-select: none;
    letter-spacing: 1px;
}

/* Modern Jump to Page */
.vet-pagination-jump {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    margin-top: 4px;
}

.vet-pagination-jump span {
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0.9;
}

.vet-pagination-input {
    width: 70px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.2;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    background: #ffffff;
    color: #1e293b;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.vet-pagination-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15),
                inset 0 1px 2px rgba(0, 0, 0, 0.05);
    background: #f8fafc;
}

.vet-pagination-input::placeholder {
    color: #94a3b8;
    opacity: 0.7;
}

.vet-pagination-go {
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.2;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.vet-pagination-go:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.25);
}

.vet-pagination-go:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}





/* Micro-interactions for app-like feel */
.vet-pagination-page {
    position: relative;
    overflow: hidden;
}

.vet-pagination-page::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
}

.vet-pagination-page:active::before {
    transform: translate(-50%, -50%) scale(15);
}

/* Loading state animation */
.vet-pagination-container.loading {
    position: relative;
    opacity: 0.8;
    pointer-events: none;
}

.vet-pagination-container.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Focus states for accessibility */
.vet-pagination-btn:focus-visible,
.vet-pagination-page:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-color: transparent;
}

/* Hide number input spinner in a modern way */
.vet-pagination-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.vet-pagination-input::-webkit-outer-spin-button,
.vet-pagination-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Smooth transitions */
.vet-pagination-container * {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}







/* Image Preview Styling */
.vet-image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
    min-height: 60px;
}

.vet-image-preview-item {
    width: 150px;
    height: 150px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.vet-image-container {
    height: 120px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
}

.vet-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vet-pdf-preview {
    text-align: center;
    padding: 10px;
}

.vet-pdf-icon-large {
    font-size: 40px;
    margin-bottom: 5px;
}

.vet-pdf-label {
    font-size: 12px;
    color: #6b7280;
}

.vet-image-actions {
    
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 5px;
    justify-content: space-between;
}

.vet-image-actions .vet-btn-sm {
   
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.vet-image-actions .vet-btn-sm svg {
    margin-right: 2px;
}

.vet-no-images {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 6px;
    border: 2px dashed #d1d5db;
    width: 100%;
}

.vet-upload-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.vet-btn-danger {
    background: #ef4444;
    color: white;
    border: 1px solid #dc2626;
}

.vet-btn-danger:hover {
    background: #dc2626;
}

.vet-btn-secondary {
    background: #6b7280;
    color: white;
    border: 1px solid #4b5563;
}

.vet-btn-secondary:hover {
    background: #4b5563;
}





/* WhatsApp Sent Button Styling */
.vet-whatsapp-sent {
    background-color: #4CAF50 !important;
    color: white !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.vet-whatsapp-sent:hover {
    background-color: #4CAF50 !important;
    opacity: 0.7;
}

/* Keep the same size and style as the WA button */
.vet-btn-whatsapp.vet-whatsapp-sent {
    background-color: #4CAF50 !important;
    border-color: #4CAF50 !important;
}










/**
 * Camera Image Upload Fix - Additional CSS
 * Add this to your main stylesheet or in the PHP file where styles are defined
 */

/* Spinner animation for image upload loading */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.vet-spinner {
    display: inline-block;
}

/* Info message style for upload notifications */
.vet-message.vet-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 4px;
    font-size: 14px;
}

/* Optional: Improve existing success and error messages if needed */
.vet-message.vet-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.vet-message.vet-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Ensure message is visible */
.vet-message {
    display: none;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 4px;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Upload progress enhancement */
.vet-image-preview-item {
    position: relative;
}

.vet-image-container {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pet image thumbnail in case card */
.vet-case-card-header {
    display: flex;
    align-items: center;
}

.vet-pet-thumbnail {
    flex-shrink: 0;
    border: 2px solid #ddd;
}

/* Pet image preview in form */
#pet-image-preview img {
    border: 2px solid #ddd;
    padding: 5px;
    background: #f9f9f9;
}

#pet-image-upload {
    padding: 5px;
}

/* Vaccination Details Styling */
.vet-vaccination-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.vet-vaccine-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.vet-vaccine-card-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.vet-vaccine-card-header h5 {
    margin: 0;
    color: #2c3e50;
    font-size: 16px;
}

.vet-full-width {
    grid-column: 1 / -1;
}

/*
.vet-treatment-items-view {
    margin-top: 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

/* Mobile scroll wrapper for table */
.vet-table-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.vet-view-table {
    width: 100%;
    min-width: 600px; /* Ensures table doesn't compress too much */
    border-collapse: collapse;
    background: white;
}

.vet-view-table thead {
    background: #f8f9fa;
}

.vet-view-table th {
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    font-size: 13px;
    color: #495057;
    white-space: nowrap; /* Prevents header text from wrapping */
}

.vet-view-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.vet-view-table tbody tr:last-child td {
    border-bottom: none;
}

.vet-view-table tbody tr:hover {
    background-color: #f8f9fa;
}

.vet-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}




.vet-badge-info {
    background: #e3f2fd;
    color: #1976d2;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vet-badge-warning {
    background: #fff3e0;
    color: #f57c00;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.vet-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-top: 4px;
}

.vet-treatment-item-result {
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.vet-treatment-item-result:hover {
    background-color: #f8f9fa;
}

.vet-treatment-item-result:last-child {
    border-bottom: none;
}

.vet-treatment-item-name {
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.vet-treatment-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.vet-treatment-item-price {
    color: #059669;
    font-weight: 600;
}

.vet-treatment-item-qty,
.vet-treatment-item-notes {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.vet-treatment-item-qty:focus,
.vet-treatment-item-notes:focus {
    outline: none;
    border-color: #3b82f6;
}

.vet-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.vet-table {
    min-width: 600px; /* Adjust based on your content */
}





































