/*!
 * File: style.css
 * Purpose: Styles for Calculator Web App
 * Description: Defines visual layout and theme for the calculator, following an iPhone-style interface.
 * Dependencies: None
 * Exports: None (CSS only)
 * Author: Maximiliano González Calzada
 * Project: Calculator Web App
 * Created: [2025-10-14]
 * Last Updated: [2025-10-18]
 */

body {
  background-color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: white;
}

.calculator {
  width: 320px;
  background-color: #000;
  border-radius: 20px;
  padding: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.display {
  text-align: right;
  font-size: 80px;
  margin: 5px;
  padding: 20px;
  color: white;
  overflow: hidden;
  white-space: nowrap;
}

.display > input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #000;
  font-size: 3rem;
  text-align: right;
  color: #fff;
  background-color: #000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  outline: none;
  transition: all 0.2s ease-in-out;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 10px;
}

.button {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: none;
  font-size: 30px;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s;
}

.button:active {
  filter: brightness(1.2);
}

.button.number {
  background-color: #333;
}

.button.function {
  background-color: #a5a5a5;
  color: #000;
}

.button.operator {
  background-color: #ff9f0a;
}

.input-limit-feedback {
  position: absolute;
  top: 50%;
  right: 10%;
  width: 15px;
  height: 15px;
  background-color: white;
  border-radius: 3px;
  opacity: 1;
  transform: translateY(-50%);
  animation: fadeOut 0.6s ease-out forwards;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-50%) scale(1.5);
  }
}

/* === iOS-Style Mode Dialog === */
.mode-dialog {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 30, 30, 0.9);
  border-radius: 16px;
  padding: 8px 0;
  width: 200px;
  color: white;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 999;
}

.mode-dialog.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(10px);
}

/* Each Option */
.mode-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: white;
  font-size: 0.95rem;
  border: none;
  padding: 10px 16px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s;
}

.mode-option:hover {
  color: #ff9f0a;
}

.mode-icon {
  width: 24px;
  text-align: center;
  font-size: 1.1rem;
  opacity: 0.8;
}

.mode-label {
  flex: 1;
}