/* Custom Overrides for Materialize to mimic Material Design 3 */

:root {
  --md-sys-color-primary: #0b57d0; /* Google Blue */
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-surface: #f7f9fc;
  --md-sys-color-surface-container: #ffffff;
  --md-sys-color-outline: #747775;
  --md-sys-typescale-body-large-font: "Roboto", sans-serif;
  --md-sys-shape-corner-large: 24px;
  --md-sys-shape-corner-medium: 12px;
}

body {
  background-color: var(--md-sys-color-surface);
  font-family: var(--md-sys-typescale-body-large-font);
  color: #1f1f1f;
}

/* Card - M3 Style */
.card {
  background-color: var(--md-sys-color-surface-container) !important;
  border-radius: var(--md-sys-shape-corner-large) !important;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 1px 3px 1px rgba(0, 0, 0, 0.15) !important; /* Elevation 1 */
  border: none;
  overflow: hidden; /* Ensure content respects corners */
}

/* Typography */
.card-title {
  font-family:
    "Google Sans", "Roboto", sans-serif !important; /* Attempt Google Sans if available */
  color: #1f1f1f !important;
  font-weight: 400 !important;
}

/* Inputs - M3 Style (Filled/Outlined Hybrid feel) */
.input-field input[type="text"],
.input-field input[type="date"],
.input-field input[type="number"] {
  border-bottom: 1px solid var(--md-sys-color-outline) !important;
  box-shadow: none !important;
  border-radius: 4px 4px 0 0;
  transition: all 0.2s;
  background-color: #f0f4f9 !important; /* Slight fill */
  padding-left: 12px !important;
  box-sizing: border-box !important;
}

.input-field input:focus {
  border-bottom: 2px solid var(--md-sys-color-primary) !important;
  background-color: #e8f0fe !important;
}

/* Table */
.claim-table th {
  font-weight: 600;
  color: #444746;
  background-color: transparent;
  border-bottom: 1px solid #e0e0e0;
  padding: 16px 8px;
}

.claim-table td {
  padding: 12px 8px;
  border-bottom: 1px solid #f1f1f1;
}

/* Input inside table - minimize visual noise */
.claim-table input {
  height: 2.5rem !important;
  margin: 0 !important;
  font-size: 0.95rem !important;
  border: 1px solid transparent !important;
  background-color: transparent !important;
  border-radius: 4px;
  padding: 0 8px !important;
}

.claim-table input:hover {
  background-color: #f1f1f1 !important;
}

.claim-table input:focus {
  background-color: #ffffff !important;
  border: 1px solid var(--md-sys-color-primary) !important;
  box-shadow: 0 0 0 1px var(--md-sys-color-primary) !important;
}

/* Buttons - M3 FAB and Filled */
.btn-floating {
  background-color: var(--md-sys-color-primary) !important;
  box-shadow:
    0 3px 6px rgba(0, 0, 0, 0.16),
    0 3px 6px rgba(23, 23, 23, 0.23) !important; /* M3 Elevation 3 */
  border-radius: 16px !important; /* M3 FAB is squarer */
}

.btn-large {
  border-radius: 28px !important; /* M3 Pill shape */
  text-transform: none !important; /* M3 uses sentence case usually, but mixed is ok. Remove all caps */
  font-weight: 500;
  letter-spacing: 0.5px;
  box-shadow: none !important;
}

.btn-large:hover {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 1px 3px 1px rgba(0, 0, 0, 0.15) !important;
}

/* File Upload Logic */
.file-upload-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.file-upload-wrapper:hover {
  background-color: #e3e3e3;
}

.upload-icon {
  color: #444746; /* M3 On Surface Variant */
  font-size: 20px !important;
}

.upload-icon.active {
  color: var(--md-sys-color-primary);
}

.delete-icon {
  color: #ba1a1a; /* M3 Error */
  font-size: 20px !important;
  padding: 4px;
  border-radius: 50%;
}

.delete-icon:hover {
  background-color: #ffdad6; /* Error Container */
}

/* Hide default file input */
.hidden-file-input {
  display: none;
}

/* Responsive Font Sizes */
@media only screen and (max-width: 600px) {
  .card-title {
    font-size: 1.5rem !important;
  }
}
