﻿/* ==========================================================================
   IBM CARBON DESIGN SYSTEM TOKENS - DENTAL PORTAL
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;600&family=IBM+Plex+Mono:wght@400&display=swap');

:root {
  /* Colors */
  --cds-background: #ffffff;
  --cds-layer-01: #f4f4f4; /* Cards, alternating rows */
  --cds-layer-02: #e0e0e0;
  
  --cds-text-primary: #161616;
  --cds-text-secondary: #525252;
  --cds-text-placeholder: #6f6f6f;
  
  --cds-border-subtle: #c6c6c6;
  --cds-border-strong: #8d8d8d;
  
  --cds-interactive-primary: #0f62fe;
  --cds-interactive-hover: #0353e9;
  --cds-interactive-active: #002d9c;
  
  --cds-nav-bg: #161616;
  --cds-nav-text: #c6c6c6;
  --cds-nav-hover: #ffffff;
  
  --cds-support-error: #da1e28;
  --cds-support-success: #24a148;

  /* Typography */
  --font-sans: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', Menlo, monospace;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--cds-background);
  color: var(--cds-text-primary);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

ul, ol { list-style: none; }
a { text-decoration: none; color: var(--cds-interactive-primary); transition: color 0.2s ease; }
a:hover { color: var(--cds-interactive-hover); text-decoration: underline; }

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 300;
  color: var(--cds-text-primary);
}

.cds-display-01 { font-size: 3.75rem; line-height: 1.17; font-weight: 300; }
.cds-display-02 { font-size: 3rem; line-height: 1.17; font-weight: 300; }
.cds-heading-02 { font-size: 2rem; line-height: 1.25; font-weight: 400; }
.cds-heading-03 { font-size: 1.5rem; line-height: 1.33; font-weight: 400; }
.cds-heading-04 { font-size: 1.25rem; line-height: 1.4; font-weight: 600; }

.cds-body-long { font-size: 1rem; line-height: 1.5; font-weight: 400; }
.cds-body-short { font-size: 0.88rem; line-height: 1.29; font-weight: 400; letter-spacing: 0.16px; }
.cds-caption { font-size: 0.75rem; line-height: 1.33; font-weight: 400; letter-spacing: 0.32px; color: var(--cds-text-secondary); }

.cds-mono { font-family: var(--font-mono); font-size: 0.88rem; letter-spacing: 0.16px; }

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.cds-container {
  max-width: 1584px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 672px) { .cds-container { padding: 0 32px; } }

.cds-grid { display: grid; gap: 32px; }
.cds-grid-2 { grid-template-columns: repeat(1, 1fr); }
.cds-grid-3 { grid-template-columns: repeat(1, 1fr); }
.cds-grid-4 { grid-template-columns: repeat(1, 1fr); }

@media (min-width: 672px) {
  .cds-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .cds-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .cds-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1056px) {
  .cds-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .cds-grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.cds-section {
  padding: 48px 0;
}
.cds-section--gray {
  background-color: var(--cds-layer-01);
}
@media (min-width: 1056px) {
  .cds-section { padding: 96px 0; }
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* Button */
.cds-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--cds-interactive-primary);
  color: #fff;
  font-size: 0.88rem;
  font-family: var(--font-sans);
  font-weight: 400;
  padding: 14px 63px 14px 15px;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  height: 48px;
  transition: background 0.2s;
  text-decoration: none;
}
.cds-button:hover { background-color: var(--cds-interactive-hover); color: #fff; text-decoration: none; }
.cds-button:active { background-color: var(--cds-interactive-active); }

/* Ghost/Tertiary Button */
.cds-button--ghost {
  background-color: transparent;
  color: var(--cds-interactive-primary);
}
.cds-button--ghost:hover {
  background-color: var(--cds-layer-02);
  color: var(--cds-interactive-hover);
}

/* Inputs */
.cds-input-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 24px;
}
.cds-input-label {
  font-size: 0.75rem;
  letter-spacing: 0.32px;
  color: var(--cds-text-secondary);
  margin-bottom: 8px;
}
.cds-input {
  background-color: var(--cds-layer-01);
  border: none;
  border-bottom: 2px solid var(--cds-border-strong);
  height: 48px;
  padding: 0 16px;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--cds-text-primary);
  border-radius: 0;
  width: 100%;
}
.cds-input:focus {
  outline: none;
  border-bottom: 2px solid var(--cds-interactive-primary);
}

/* Cards / Tiles */
.cds-tile {
  background-color: var(--cds-layer-01);
  padding: 16px;
  border: 1px solid transparent;
  border-radius: 0 !important;
  text-decoration: none;
  color: var(--cds-text-primary);
  transition: all 0.2s ease;
  display: block;
}
.cds-tile--white { background-color: var(--cds-background); }
.cds-tile--flush { 
  padding: 0; 
  overflow: hidden; 
  display: flex; 
  flex-direction: column; 
}
.cds-tile-image-container { 
  width: 100%; 
  height: 140px; 
  background-color: var(--cds-layer-02); 
  border-bottom: 1px solid var(--cds-border-subtle); 
}
.cds-tile-image { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}
.cds-tile-content { 
  padding: 16px; 
  flex-grow: 1; 
  display: flex; 
  flex-direction: column; 
}
.cds-tile-footer { 
  margin-top: auto; 
  display: flex; 
  justify-content: space-between; 
  align-items: flex-end; 
}
.cds-tile:hover {
  background-color: var(--cds-layer-02);
  border-bottom: 2px solid var(--cds-interactive-primary);
  text-decoration: none;
}
.cds-tile-title {
  margin-bottom: 16px;
}
.cds-tile-icon {
  margin-left: auto;
  color: var(--cds-interactive-primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.cds-tile:hover .cds-tile-icon {
  opacity: 1;
}

/* Tags / Pills (Insurance) */
.cds-tag {
  display: inline-flex;
  align-items: center;
  background-color: #edf5ff; /* Blue 10 */
  color: var(--cds-interactive-primary);
  padding: 4px 8px;
  border-radius: 24px;
  font-size: 0.75rem;
  font-weight: 400;
  white-space: nowrap;
}


/* Footer */
.cds-footer {
  background-color: var(--cds-nav-bg);
  padding: 48px 0;
  color: var(--cds-nav-text);
}
.cds-footer-title {
  color: #fff;
  margin-bottom: 16px;
}
.cds-footer-link { color: var(--cds-nav-text); }
.cds-footer-link:hover { color: var(--cds-nav-hover); }

/* Strict focus styles for search and buttons to prevent outline bleeds */
.cds--search-input:focus {
  outline: 2px solid var(--cds-interactive-primary, #0f62fe) !important;
  outline-offset: -2px !important;
}

.cds--btn:focus {
  outline: 2px solid var(--cds-interactive-primary, #0f62fe) !important;
  outline-offset: -2px !important;
}

/* ==========================================================================
   MOBILE TYPOGRAPHY & PADDING
   ========================================================================== */
@media (max-width: 672px) {
  /* Scale down massive display fonts on mobile */
  .cds-display-01 { font-size: 2.25rem; line-height: 1.2; }
  .cds-display-02 { font-size: 1.75rem; line-height: 1.2; }
  .cds-heading-02 { font-size: 1.5rem; }
  
  /* Reduce excessive whitespace padding */
  .cds-section { padding: 48px 0; }
  
  /* Ensure hero sections and text blocks don't overflow */
  .cds-container, .cds-hero-container {
    padding: 0 16px;
    width: 100%;
    overflow-x: hidden;
  }
}

/* ==========================================================================
   GLOBAL FOOTER SEAL
   ========================================================================== */
.footer-brand-seal {
  width: 140px; /* Scaled down slightly to look like a precise seal with the text */
  height: auto;
  margin-bottom: 8px; /* Tucked tightly to the text */
  display: block;
  
  /* The Watermark/Seal Magic for Dark Backgrounds */
  /* Do NOT invert because our BestDentalSG-logo.png is already a white/platinum transparent PNG */
  filter: opacity(90%); /* Dramatically improved clarity and brightness */
  mix-blend-mode: screen; 
}

/* ==========================================================================
   IBM CARBON CLINIC ACCORDION UI
   ========================================================================== */
.cds-accordion-item {
  border-bottom: 1px solid var(--cds-ui-03, #e0e0e0);
  background-color: transparent;
}
.cds-accordion-summary {
  padding: 24px 0;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--cds-text-primary, #161616);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  outline: none;
}
.cds-accordion-summary::-webkit-details-marker {
  display: none;
}
.cds-accordion-summary::after {
  content: '+';
  font-size: 24px;
  font-weight: 400;
  color: var(--cds-interactive-01, #0043ce);
}
.cds-accordion-item[open] .cds-accordion-summary::after {
  content: '−';
}
.cds-accordion-content {
  padding: 0 0 32px 0;
  color: var(--cds-text-secondary, #525252);
}