/* HMC Connect - Standalone Android MD3 App CSS */

/* Android Viewport Wrapper */
.phone-viewport-android {
  max-width: 412px;
  height: 892px;
  margin: 40px auto;
  border-radius: 36px;
  background-color: var(--bg-gray);
  box-shadow: 0 0 0 10px #1E293B, 0 20px 45px rgba(0,0,0,0.18);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 3px solid #334155;
  font-family: var(--font-roboto);
}

@media (max-width: 480px) {
  .phone-viewport-android {
    max-width: 100vw;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
  }
}

/* Android Status Bar */
.android-status-bar {
  height: 38px;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 500;
  color: #212121;
  background-color: transparent;
  z-index: 100;
  user-select: none;
}

.android-status-bar .status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.android-status-bar .status-icons span {
  font-size: 1.1rem;
}

/* Android Navigation Bar (Gestures line) */
.android-gesture-bar {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 4px;
  background-color: #212121;
  border-radius: 2px;
  z-index: 200;
  pointer-events: none;
}

/* MD3 Specific Headers */
.md3-header {
  padding: var(--space-md) var(--space-sm) var(--space-xs);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.md3-header-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-dark);
}

/* MD3 Bottom Navigation Bar */
.md3-navigation-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background-color: #F1F5F9;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: 12px;
  z-index: 150;
}

.md3-navigation-bar.hidden {
  display: none !important;
}

.md3-navigation-bar .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  width: 70px;
  height: 100%;
  font-size: 0.72rem;
  font-weight: 600;
  gap: 4px;
}

/* MD3 Active Highlight Capsule Pill */
.md3-icon-wrapper {
  padding: 4px 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.md3-icon-wrapper span {
  font-size: 1.5rem;
  font-variation-settings: 'FILL' 0, 'wght' 400;
}

.md3-navigation-bar .nav-item.active {
  color: var(--text-dark);
}

.md3-navigation-bar .nav-item.active .md3-icon-wrapper {
  background-color: var(--light-blue);
  color: var(--primary-blue);
}

.md3-navigation-bar .nav-item.active .md3-icon-wrapper span {
  font-variation-settings: 'FILL' 1, 'wght' 500;
}

/* MD3 Floating Action Button (FAB) */
.md3-fab {
  position: absolute;
  bottom: 96px;
  right: var(--space-md);
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background-color: var(--light-blue);
  color: var(--primary-blue);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 120;
  transition: all 0.2s ease;
}

.md3-fab:hover {
  transform: scale(1.08);
}

.md3-fab span {
  font-size: 1.8rem;
}

/* MD3 Input Fields */
.md3-input-field {
  background-color: #F1F5F9;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  border-bottom: 2px solid var(--text-muted);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  transition: border-bottom-color 0.2s ease;
}

.md3-input-field:focus-within {
  border-bottom-color: var(--primary-blue);
}

.md3-input-field span {
  color: var(--text-muted);
}

.md3-input-field input {
  background: none;
  width: 100%;
  color: var(--text-dark);
  font-weight: 500;
}

/* MD3 Card Styling */
.md3-card-filled {
  background-color: #F1F5F9;
  border-radius: 16px;
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.md3-card-outlined {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

/* Android Dark Theme support */
body.dark-theme {
  --bg-gray: #0F172A;
  --card-bg: #1E293B;
  --text-dark: #F8FAFC;
  --text-muted: #94A3B8;
  --border-color: #334155;
  --light-blue: #1E3A8A;
}

body.dark-theme .android-status-bar {
  color: #FFFFFF;
}

body.dark-theme .android-gesture-bar {
  background-color: #FFFFFF;
}

body.dark-theme .md3-navigation-bar {
  background-color: #1E293B;
  border-top-color: #334155;
}

body.dark-theme .md3-input-field {
  background-color: #1E293B;
}

body.dark-theme .md3-card-filled {
  background-color: #1E293B;
}

body.dark-theme .md3-card-outlined {
  background-color: #0F172A;
  border-color: #334155;
}
