/** W3.CSS Template Styles for FoodTruck Avenue Customer App */

/** ========================================
    BASE STYLES & TYPOGRAPHY
    ======================================== */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

/** Page Titles */
h1 {
  font-size: 1.75em;
  font-weight: 600;
  color: #333;
  margin: 16px 0;
  text-align: center;
}

h2 {
  font-size: 1.5em;
  font-weight: 600;
  text-align: center;
  color: #333;
  margin: 12px 0;
}

h3, h4 {
  font-weight: 600;
  color: #333;
  margin: 8px 0;
}

p {
  margin: 8px 0;
}

/** ========================================
    FORM ELEMENTS
    ======================================== */

.w3-input, .w3-select {
  padding: 12px;
  display: block;
  border: 1px solid #ddd !important;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.w3-input:focus, .w3-select:focus {
  border-color: #2196F3 !important;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
  outline: none;
}

/** Labels */
label {
  color: #555 !important;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 4px;
  display: block;
}

.w3-text-grey {
  color: #666 !important;
}

/** Checkboxes */
.gwt-CheckBox {
  display: flex !important;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.gwt-CheckBox input {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.gwt-CheckBox label {
  display: inline !important;
  margin-bottom: 0;
  cursor: pointer;
}

/** ========================================
    BUTTONS
    ======================================== */

.sendButton, .w3-button {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  background-color: inherit;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.w3-button:hover {
  color: #000 !important;
  background-color: #e0e0e0 !important;
  transform: translateY(-1px);
}

.w3-blue, .w3-hover-blue:hover {
  color: #fff !important;
  background-color: #2196F3 !important;
}

.w3-blue:hover, .w3-hover-blue:hover {
  color: #fff !important;
  background-color: #1976D2 !important;
}

/** Primary action button */
.btn-primary {
  background-color: #2196F3 !important;
  color: #fff !important;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.btn-primary:hover {
  background-color: #1976D2 !important;
  box-shadow: 0 4px 8px rgba(33, 150, 243, 0.4);
  transform: translateY(-1px);
}

/** ========================================
    CARD & CONTAINER STYLES
    ======================================== */

/** Standard card styling for all views */
.card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/** Section card with header */
.section-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  margin: 12px 0;
  overflow: hidden;
}

.section-card-header {
  background: #f8f9fa;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  font-weight: 600;
  color: #333;
}

.section-card-body {
  padding: 16px;
}

/** List item card (for food styles, packages, etc.) */
.list-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
}

.list-card:hover {
  border-color: #2196F3;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/** Form container */
.form-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px;
}

/** View container - consistent padding for all views */
.view-container {
  padding: 16px;
  max-width: 800px;
  margin: 0 auto;
}

/** ========================================
    FORM SECTIONS
    ======================================== */

.form-section {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
}

.form-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #2196F3;
}

.form-row {
  margin-bottom: 16px;
}

.form-row:last-child {
  margin-bottom: 0;
}

/** W3.CSS Breadcrumb Navigation - New Style */
.breadcrumb-bar {
  display: flex;
  align-items: center;
  padding: 0;
}

.breadcrumb-bar .w3-bar-item {
  padding: 2px 4px !important;
  display: inline-block;
  text-decoration: none;
}

.breadcrumb-bar .w3-button {
  padding: 2px 4px !important;
  text-decoration: none;
}

.breadcrumb-bar .w3-text-blue {
  color: #2196F3!important;
}

.breadcrumb-bar .w3-text-grey {
  color: #777!important;
}

.breadcrumb-bar span {
  color: #777!important;
  padding: 2px 1px !important;
}

/** Legacy breadcrumb support */
.breadcrumb {
  list-style: none;
  background-color: #eee;
  padding: 10px 16px;
  margin: 0;
  overflow: hidden;
}

.breadcrumb li {
  display: inline;
  font-size: 18px;
}

.breadcrumb li+li:before {
  padding: 8px;
  color: black;
  content: "/\00a0";
}

.breadcrumb li a {
  color: #0275d8;
  text-decoration: none;
}

.breadcrumb li a:hover {
  color: #01447e;
  text-decoration: underline;
}

/** ========================================
    PRICING & STATUS COLORS
    ======================================== */

.price-text {
  color: #2e7d32;
  font-weight: 600;
}

.w3-text-green {
  color: #2e7d32 !important;
}

.error-text, .w3-text-red {
  color: #d32f2f !important;
}

.info-text {
  color: #666;
  font-size: 14px;
}

/** ========================================
    AVATAR & IMAGE STYLES
    ======================================== */

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #f5f5f5;
  border: 2px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #666;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-text {
  font-size: 14px;
  font-weight: 600;
  color: #666;
}

/** ========================================
    SPACING UTILITIES
    ======================================== */

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 8px !important; }
.pt-2 { padding-top: 16px !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 8px !important; }
.pb-2 { padding-bottom: 16px !important; }

/** ========================================
    TEXT UTILITIES
    ======================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-sm { font-size: 12px; }
.text-md { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 18px; }

.font-bold { font-weight: 600; }
.font-normal { font-weight: 400; }

/** ========================================
    DIALOG AND ERROR STYLES
    ======================================== */

.gwt-DialogBox {
  width: 400px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.dialogVPanel {
  margin: 5px;
}

.serverResponseLabelError {
  color: #d32f2f;
}

/** Set ids using widget.getElement().setId("idOfElement") */
#closeButton {
  margin: 15px 6px 6px;
}

/** ========================================
    WAIT POPUP / LOADING OVERLAY
    ======================================== */

/** Glass panel backdrop - fades out content behind */
.gwt-PopupPanelGlass {
  background-color: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/** Wait popup container */
.waitPopup {
  background: #fff !important;
  border-radius: 16px !important;
  padding: 32px 48px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
  text-align: center;
}

.waitPopup img {
  max-width: 80px;
  max-height: 80px;
}

/** ========================================
    FOOD TRUCK LOADER ANIMATION
    ======================================== */

.food-truck-loader {
  width: 140px;
  height: 90px;
  position: relative;
  margin: 0 auto;
}

.truck-container {
  position: relative;
  animation: truck-bounce 0.4s ease-in-out infinite;
}

.truck {
  position: relative;
  width: 110px;
  height: 60px;
  margin-left: 15px;
}

/* Main truck body */
.truck-body {
  position: absolute;
  left: 0;
  bottom: 14px;
  width: 65px;
  height: 42px;
  background: linear-gradient(180deg, #E53935 0%, #C62828 100%);
  border-radius: 6px 6px 0 0;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.2),
    inset 0 -2px 0 rgba(0,0,0,0.1),
    2px 0 0 rgba(0,0,0,0.1);
}

/* Side panel for pizza graphic */
.truck-panel {
  position: absolute;
  bottom: 4px;
  left: 4px;
  width: 30px;
  height: 22px;
  background: #fff;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
  overflow: hidden;
}

/* Pizza slice icon */
.pizza-icon {
  position: relative;
  width: 100%;
  height: 100%;
}

.pizza-slice {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 16px solid #FFC107;
  border-radius: 0 0 2px 2px;
}

.pizza-slice::before {
  content: '';
  position: absolute;
  top: 10px;
  left: -8px;
  width: 16px;
  height: 6px;
  background: #FFCA28;
  border-radius: 0 0 8px 8px;
}

.pizza-topping {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #D32F2F;
  border-radius: 50%;
}

.pizza-topping.t1 { bottom: 6px; left: 10px; }
.pizza-topping.t2 { bottom: 10px; left: 15px; }
.pizza-topping.t3 { bottom: 7px; left: 18px; }

/* Serving window */
.truck-window {
  position: absolute;
  top: 4px;
  left: 38px;
  width: 22px;
  height: 16px;
  background: linear-gradient(180deg, #4FC3F7 0%, #29B6F6 100%);
  border-radius: 3px;
  border: 2px solid #B71C1C;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.2);
}

/* Awning */
.truck-awning {
  position: absolute;
  top: -5px;
  left: -4px;
  width: 73px;
  height: 7px;
  background: repeating-linear-gradient(
    90deg,
    #fff 0px,
    #fff 6px,
    #4CAF50 6px,
    #4CAF50 12px
  );
  border-radius: 3px 3px 0 0;
  box-shadow: 0 2px 2px rgba(0,0,0,0.1);
}

/* Serving counter */
.serving-counter {
  position: absolute;
  top: 22px;
  left: 36px;
  width: 28px;
  height: 4px;
  background: #8D6E63;
  border-radius: 0 0 2px 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Truck cab */
.truck-cab {
  position: absolute;
  right: 0;
  bottom: 14px;
  width: 38px;
  height: 30px;
  background: linear-gradient(180deg, #E53935 0%, #C62828 100%);
  border-radius: 0 10px 0 0;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.2),
    inset -2px -2px 0 rgba(0,0,0,0.1);
}

.cab-window {
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  height: 12px;
  background: linear-gradient(180deg, #4FC3F7 0%, #29B6F6 100%);
  border-radius: 0 6px 0 0;
  border: 2px solid #B71C1C;
}

.headlight {
  position: absolute;
  bottom: 6px;
  right: 3px;
  width: 6px;
  height: 4px;
  background: #FFF59D;
  border-radius: 2px;
  box-shadow: 0 0 4px #FFF59D;
}

/* Bumper */
.bumper {
  position: absolute;
  bottom: 10px;
  right: -4px;
  width: 6px;
  height: 8px;
  background: #757575;
  border-radius: 0 3px 3px 0;
}

/* Wheels */
.wheel {
  position: absolute;
  bottom: 0;
  width: 16px;
  height: 16px;
  background: #212121;
  border-radius: 50%;
  border: 3px solid #424242;
  box-shadow: inset 0 0 0 2px #616161;
}

.hubcap {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: #9E9E9E;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: wheel-spin 0.3s linear infinite;
}

.hubcap::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 6px;
  background: #757575;
  transform: translate(-50%, -50%);
}

.wheel-back {
  left: 10px;
}

.wheel-front {
  right: 12px;
}

/* Steam from food */
.steam-container {
  position: absolute;
  left: 48px;
  top: -5px;
}

.steam {
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: steam-rise 1.2s ease-out infinite;
}

.steam-1 { left: 0; animation-delay: 0s; }
.steam-2 { left: 8px; animation-delay: 0.4s; }
.steam-3 { left: 4px; animation-delay: 0.8s; }

/* Road */
.road {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #78909C;
  border-radius: 2px;
}

.road-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  transform: translateY(-50%);
  background: repeating-linear-gradient(
    90deg,
    #FFD54F 0px,
    #FFD54F 10px,
    transparent 10px,
    transparent 20px
  );
  animation: road-move 0.4s linear infinite;
}

@keyframes truck-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes wheel-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes steam-rise {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  20% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateY(-15px) scale(1.5);
  }
}

@keyframes road-move {
  from { transform: translateY(-50%) translateX(0); }
  to { transform: translateY(-50%) translateX(-20px); }
}

.waitPopup .gwt-Label {
  margin-top: 16px;
  color: #333;
  font-size: 14px;
  font-weight: 500;
}

.waitPopup .gwt-Button {
  margin-top: 16px;
  padding: 10px 24px;
  background: #2196F3;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.waitPopup .gwt-Button:hover {
  background: #1976D2;
}

/** Base popup styling */
.baseCompositePopup {
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
}

/** Remove default GWT decorated popup borders */
.gwt-DecoratedPopupPanel {
  border: none !important;
}

.gwt-DecoratedPopupPanel .popupContent {
  border: none !important;
  background: transparent !important;
}

/** Hide decorator elements */
.gwt-DecoratedPopupPanel .popupTopLeft,
.gwt-DecoratedPopupPanel .popupTopRight,
.gwt-DecoratedPopupPanel .popupBottomLeft,
.gwt-DecoratedPopupPanel .popupBottomRight,
.gwt-DecoratedPopupPanel .popupTopCenter,
.gwt-DecoratedPopupPanel .popupBottomCenter,
.gwt-DecoratedPopupPanel .popupMiddleLeft,
.gwt-DecoratedPopupPanel .popupMiddleRight {
  display: none !important;
}

/** ========================================
    LOADING & STATUS STATES
    ======================================== */

.loading-message {
  text-align: center;
  color: #666;
  padding: 32px;
  font-size: 14px;
}

.empty-state {
  text-align: center;
  color: #999;
  padding: 48px 24px;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/** ========================================
    LINK STYLES
    ======================================== */

a, .link {
  color: #2196F3;
  text-decoration: none;
  cursor: pointer;
}

a:hover, .link:hover {
  text-decoration: underline;
  color: #1976D2;
}

/** ========================================
    INVOICE / PACKAGE TABLE STYLES
    ======================================== */

.package-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin: 16px 0;
}

.package-table td {
  padding: 16px;
  vertical-align: top;
}

/* Header row */
.package-table .header-row {
  background: #f8f9fa;
}

.package-table .header-row td {
  padding: 16px;
}

.package-name {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.guest-count {
  font-weight: 400;
  color: #666;
  font-size: 14px;
}

.package-options {
  font-size: 13px;
  color: #888;
  font-weight: 400;
}

.package-total {
  font-size: 20px;
  font-weight: 700;
}

/* Content columns */
.package-table .left-col {
  width: 60%;
}

.package-table .right-col {
  width: 40%;
  background: #fafafa;
}

.package-table .price-col {
  text-align: right;
}

/* Concept/Food truck info */
.concept-name {
  display: flex;
  align-items: center;
  padding: 12px 0;
  margin-bottom: 16px;
}

.concept-name img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.concept-name > div {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.concept-description {
  font-size: 13px;
  font-weight: 400;
  color: #666;
  margin-top: 2px;
}

/* Menu sections */
.menu-type {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin: 12px 0 8px 0;
  padding-bottom: 4px;
  display: inline-block;
}

.menu-items-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}

.menu-item {
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 14px;
  color: #555;
}

.menu-item i {
  color: #888;
}

/* Pricing details */
.pricing-details {
  padding: 8px 0;
}

.pricing-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.pricing-item:last-child {
  margin-top: 8px;
  padding-top: 16px;
}

.pricing-label {
  font-size: 14px;
  color: #666;
}

.pricing-item:last-child .pricing-label {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.pricing-value {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.pricing-item:last-child .pricing-value {
  font-size: 20px;
  font-weight: 700;
  color: #2e7d32;
}

/** ========================================
    RESPONSIVE ADJUSTMENTS
    ======================================== */

@media (max-width: 600px) {
  .card, .form-section, .list-card {
    margin-left: 0;
    margin-right: 0;
    border-radius: 8px;
  }

  .view-container {
    padding: 12px;
  }

  h1 {
    font-size: 1.5em;
  }

  h2 {
    font-size: 1.25em;
  }

  .btn-primary {
    width: 100%;
    padding: 16px;
  }

  /* Invoice table responsive */
  .package-table .left-col,
  .package-table .right-col {
    width: 100%;
    display: block;
  }

  .package-table tr {
    display: block;
  }

  .package-table td {
    display: block;
  }

  .package-name {
    font-size: 16px;
  }

  .package-total {
    font-size: 20px;
    margin-top: 8px;
  }
}
