/* Calculator Page Styles */
.calculator-container {
  max-width: 600px;
  margin: 20px auto;
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 30px;
}

.calculator-container h1 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--primary-color);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: var(--gray-800);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--gray-400);
  border-radius: var(--border-radius);
  font-size: 16px;
}

.btn-primary {
  display: block;
  width: 100%;
  padding: 12px;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--dark-color);
}

.result {
  margin-top: 20px;
  padding: 15px;
  background-color: var(--gray-100);
  border-radius: var(--border-radius);
  text-align: center;
  font-weight: bold;
  color: var(--gray-800);
}

/* Result Display Improvements for Time Zone Converter */
.result h3 {
  margin-bottom: 20px;
  color: var(--primary-color);
  font-size: 1.3rem;
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 2px dashed var(--gray-400);
}

.result p {
  margin: 15px 0;
  padding: 15px;
  background-color: var(--white);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border-left: 4px solid var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
}

.result p::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 2px;
  border-top: 2px dotted var(--gray-400);
}

.result p:last-child::after {
  display: none;
}

.result p strong {
  color: var(--gray-500);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.result p strong::before {
  content: '●';
  margin-right: 6px;
  color: var(--primary-color);
  font-size: 0.6rem;
}

.result p span {
  color: var(--primary-color);
  font-size: 1.15rem;
  font-weight: bold;
  word-break: break-word;
  text-align: center;
  padding: 8px 12px;
  background-color: var(--gray-100);
  border-radius: 6px;
  width: 100%;
}

/* Responsive adjustments for small devices */
@media (max-width: 480px) {
  .calculator-container {
    padding: 15px;
    margin: 10px;
  }
  
  .result {
    padding: 12px;
  }
  
  .result h3 {
    font-size: 1.1rem;
  }
  
  .result p {
    padding: 12px 8px;
  }
  
  .result p strong {
    font-size: 0.8rem;
  }
  
  .result p span {
    font-size: 1rem;
    text-align: center;
  }
}

@media (max-width: 360px) {
  .result p span {
    font-size: 0.9rem;
  }
}

/* Bill/Receipt Style Results */
.result.bill-style {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 2px solid #dee2e6;
  border-radius: 12px;
  padding: 25px;
  position: relative;
  overflow: hidden;
}

.result.bill-style::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    45deg,
    var(--primary-color),
    var(--primary-color) 10px,
    var(--white) 10px,
    var(--white) 20px
  );
}

.result.bill-style::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    45deg,
    var(--primary-color),
    var(--primary-color) 10px,
    var(--white) 10px,
    var(--white) 20px
  );
}

.result.bill-style h3 {
  text-align: center;
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px dashed var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.result.bill-style .bill-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px dashed var(--gray-400);
}

.result.bill-style .bill-header h3 {
  margin-bottom: 5px;
  border-bottom: none;
  padding-bottom: 0;
}

.result.bill-style .bill-header .receipt-number {
  font-size: 0.75rem;
  color: var(--gray-500);
  letter-spacing: 1px;
}

.result.bill-style .bill-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dotted var(--gray-400);
  position: relative;
}

.result.bill-style .bill-item::before {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    var(--gray-400) 0,
    var(--gray-400) 4px,
    transparent 4px,
    transparent 8px
  );
}

.result.bill-style .bill-item:last-of-type {
  border-bottom: none;
}

.result.bill-style .bill-item:last-of-type::before {
  display: none;
}

.result.bill-style .bill-item .item-label {
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.95rem;
}

.result.bill-style .bill-item .item-value {
  font-weight: bold;
  color: var(--primary-color);
  font-size: 1rem;
}

.result.bill-style .bill-divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.result.bill-style .bill-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--gray-400) 0,
    var(--gray-400) 8px,
    transparent 8px,
    transparent 16px
  );
}

.result.bill-style .bill-divider span {
  background: var(--white);
  padding: 0 15px;
  position: relative;
  color: var(--gray-500);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.result.bill-style .bill-total {
  background: linear-gradient(135deg, var(--primary-color) 0%, #2a5298 100%);
  color: var(--white);
  padding: 20px;
  border-radius: 10px;
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.result.bill-style .bill-total .total-label {
  font-size: 1.1rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.result.bill-style .bill-total .total-value {
  font-size: 1.5rem;
  font-weight: bold;
}

.result.bill-style .bill-total .total-value .currency {
  font-size: 1rem;
  opacity: 0.9;
}

.result.bill-style .status-eligible {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: var(--white);
  padding: 15px 20px;
  border-radius: 10px;
  text-align: center;
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.result.bill-style .status-not-eligible {
  background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
  color: var(--white);
  padding: 15px 20px;
  border-radius: 10px;
  text-align: center;
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.result.bill-style .bill-item.highlight {
  background: rgba(0, 123, 255, 0.1);
  padding: 15px;
  border-radius: 8px;
  margin: 10px 0;
  border: 1px solid rgba(0, 123, 255, 0.2);
}

.result.bill-style .bill-item .item-label small {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-500);
  font-weight: normal;
  margin-top: 2px;
}

/* Simple result style (for calculators with single result) */
.result.simple-result {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 2px solid #dee2e6;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
}

.result.simple-result h3 {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px dashed var(--gray-400);
}

.result.simple-result .result-value {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary-color);
  padding: 15px;
  background: rgba(0, 123, 255, 0.1);
  border-radius: 10px;
  display: inline-block;
}

/* Two column layout for related items */
.result.bill-style .bill-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.result.bill-style .bill-row .bill-item {
  flex: 1;
  flex-direction: column;
  text-align: center;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 15px;
}

.result.bill-style .bill-row .bill-item .item-value {
  margin-top: 8px;
  font-size: 1.2rem;
}

/* Time zone specific styling */
.result.bill-style .timezone-item {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  padding: 15px;
  margin: 10px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.result.bill-style .timezone-item .tz-label {
  font-size: 0.85rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.result.bill-style .timezone-item .tz-value {
  font-size: 1.1rem;
  color: var(--primary-color);
  font-weight: bold;
}

/* BMI Category Colors */
.result.bill-style .category-underweight {
  color: #ffc107;
}

.result.bill-style .category-normal {
  color: #28a745;
}

.result.bill-style .category-overweight {
  color: #fd7e14;
}

.result.bill-style .category-obese {
  color: #dc3545;
}

/* ============================================
   MOBILE RESPONSIVE STYLES FOR CALCULATOR RESULTS
   ============================================ */

/* Responsive container for tablets */
@media (max-width: 768px) {
  .calculator-container {
    padding: 20px;
    margin: 15px;
  }
  
  .result.bill-style {
    padding: 20px;
  }
  
  .result.bill-style h3 {
    font-size: 1.2rem;
  }
  
  .result.bill-style .bill-item {
    padding: 10px 0;
  }
  
  .result.bill-style .bill-item .item-label,
  .result.bill-style .bill-item .item-value {
    font-size: 0.9rem;
  }
  
  .result.bill-style .bill-total {
    padding: 15px;
  }
  
  .result.bill-style .bill-total .total-label {
    font-size: 1rem;
  }
  
  .result.bill-style .bill-total .total-value {
    font-size: 1.3rem;
  }
  
  /* Two column layout - switch to single column on tablet */
  .result.bill-style .bill-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .result.bill-style .bill-row .bill-item {
    flex-direction: row;
    justify-content: space-between;
    padding: 12px;
  }
  
  .result.bill-style .bill-row .bill-item .item-value {
    margin-top: 0;
    font-size: 1rem;
  }
}

/* Responsive styles for mobile phones */
@media (max-width: 480px) {
  .calculator-container {
    padding: 15px;
    margin: 10px;
    border-radius: 8px;
  }
  
  .calculator-container h1 {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }
  
  .form-group input,
  .form-group select {
    padding: 12px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .btn-primary {
    padding: 14px;
    font-size: 16px;
  }
  
  /* Result container mobile styles */
  .result.bill-style {
    padding: 15px;
    margin-top: 15px;
  }
  
  .result.bill-style::before,
  .result.bill-style::after {
    height: 4px;
  }
  
  .result.bill-style h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
  }
  
  /* Bill items - stack vertically on mobile */
  .result.bill-style .bill-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 12px 0;
    border-bottom: 1px dotted var(--gray-400);
  }
  
  .result.bill-style .bill-item .item-label {
    font-size: 0.85rem;
    color: var(--gray-600);
  }
  
  .result.bill-style .bill-item .item-value {
    font-size: 1.1rem;
    word-break: break-word;
    text-align: left;
    width: 100%;
  }
  
  /* Bill divider mobile */
  .result.bill-style .bill-divider {
    margin: 15px 0;
  }
  
  .result.bill-style .bill-divider span {
    font-size: 0.7rem;
    padding: 0 10px;
  }
  
  /* Bill total - stack vertically on mobile */
  .result.bill-style .bill-total {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding: 15px;
    margin-top: 15px;
  }
  
  .result.bill-style .bill-total .total-label {
    font-size: 0.9rem;
  }
  
  .result.bill-style .bill-total .total-value {
    font-size: 1.5rem;
  }
  
  /* Bill row - stack all items vertically */
  .result.bill-style .bill-row {
    flex-direction: column;
    gap: 8px;
  }
  
  .result.bill-style .bill-row .bill-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 10px;
  }
  
  .result.bill-style .bill-row .bill-item .item-label {
    font-size: 0.8rem;
  }
  
  .result.bill-style .bill-row .bill-item .item-value {
    font-size: 1rem;
    margin-top: 3px;
  }
  
  /* Status badges */
  .result.bill-style .status-eligible,
  .result.bill-style .status-not-eligible {
    padding: 12px 15px;
    font-size: 1rem;
    margin-bottom: 15px;
  }
  
  /* Timezone items */
  .result.bill-style .timezone-item {
    padding: 12px;
    margin: 8px 0;
  }
  
  .result.bill-style .timezone-item .tz-label {
    font-size: 0.75rem;
  }
  
  .result.bill-style .timezone-item .tz-value {
    font-size: 1rem;
  }
  
  /* Highlighted items */
  .result.bill-style .bill-item.highlight {
    padding: 12px;
    margin: 8px 0;
  }
  
  /* Simple result mobile */
  .result.simple-result {
    padding: 20px;
  }
  
  .result.simple-result .result-value {
    font-size: 1.4rem;
    padding: 12px;
  }
  
  /* Result paragraph styles */
  .result p {
    padding: 12px 10px;
    margin: 12px 0;
  }
  
  .result p span {
    font-size: 1rem;
    padding: 8px 10px;
    width: 100%;
  }
}

/* Extra small devices */
@media (max-width: 360px) {
  .calculator-container {
    padding: 12px;
    margin: 8px;
  }
  
  .result.bill-style {
    padding: 12px;
  }
  
  .result.bill-style h3 {
    font-size: 1rem;
  }
  
  .result.bill-style .bill-item .item-value {
    font-size: 1rem;
  }
  
  .result.bill-style .bill-total .total-value {
    font-size: 1.3rem;
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  .btn-primary {
    padding: 16px; /* Larger touch target */
  }
  
  .form-group input,
  .form-group select {
    min-height: 48px; /* Minimum touch target size */
  }
  
  .result.bill-style .bill-item {
    padding: 14px 0;
  }
  
  .result.bill-style .bill-total {
    padding: 18px;
  }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
  .calculator-container {
    margin: 10px auto;
    padding: 15px;
  }
  
  .result.bill-style {
    max-height: 60vh;
    overflow-y: auto;
  }
  
  .result.bill-style h3 {
    font-size: 1rem;
    margin-bottom: 10px;
  }
}
