/* Styles for FlexGPT website */

/* Base transitions */
* {
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
  font-family: "Poppins", sans-serif;
}

:root {
  --primary: #e81b5b;
  --bg: #affcaf;
  --text: #000000;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  50% {
    transform: scale(1.02);
  }
}

.device-icon {
  transition: transform 0.3s ease, filter 0.3s ease;
}

body {
  color: black;
  overflow-x: hidden;
  margin: 0;
  opacity: 0;
  animation: fadeIn 0.3s ease-in forwards;
  background: url('images/background.jpg') no-repeat center center fixed;
  background-size: cover;
}

/* Mobile background */
@media (max-width: 768px) {
  body {
    background: url('images/mobile-bg.jpg') no-repeat center center fixed;
    background-size: cover;
  }
}

.device-icon:hover {
  transform: translateY(-5px) !important;
  filter: brightness(1.2);
}

/* Form focus effects */
#phoneInputContainer:focus-within,
#pinInputContainer:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232, 27, 91, 0.1);
}

/* Button hover effects */
button[type="submit"] {
  transition: all 0.3s ease;
}

button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(232, 27, 91, 0.3);
}

button[type="submit"]:active {
  transform: translateY(0);
}

.theme-btn {
  background: #e81b5b;
  border: 2px #000000 solid;
  color: #ffffff;
  text-transform: uppercase;
  animation: pulse 0.5s ease-in-out infinite;
  cursor: pointer;
}

.theme-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(232, 27, 91, 0.4);
  animation-play-state: paused;
}

/* Logo container styles */
.service-log {
  height: auto;
  width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.service-log img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* RTL support */
html[dir="rtl"] .space-x-4 > * + * {
  margin-right: 1rem;
  margin-left: 0;
}

/* Critical form styles */
#pinInputContainer,
#phoneInputContainer {
  display: flex;
  align-items: center;
  border: 2px solid;
  border-color: #000000;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.212);
  color: #000000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.phone-input,
.pin-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  outline: none;
  color: #000000;
  background: transparent;
}

/* Loading spinner */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 3px solid white;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Notification styles */
.notification {
  border: 2px solid #000000;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: #000000;
}

/* Error and Success message styles */
.error-msg {
  color: #dc2626;
  font-weight: 600;
}

.success-msg {
  color: #16a34a;
  font-weight: 600;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .device-icons-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
  
  .service-log {
    width: 120px;
  }
  
  /* Reduce device icon sizes */
  .device-icon svg {
    width: 32px !important;
    height: 32px !important;
  }
  
  /* Reduce download arrow circle size */
  .bg-\[\#e81b5b\].rounded-full {
    width: 60px !important;
    height: 60px !important;
    padding: 1rem !important;
  }
  
  .bg-\[\#e81b5b\].rounded-full svg {
    width: 40px !important;
    height: 40px !important;
  }
  
  /* Adjust container padding */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Reduce margins for better spacing */
  .my-8 {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }
  
  .my-5 {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
  }
  
  /* Adjust form title size */
  #form-title-text {
    font-size: 1rem;
  }
  
  /* Fix language toggle button for mobile */
  .absolute.top-4 {
    z-index: 1000;
    pointer-events: auto;
  }
  
  .absolute.top-4 a {
    display: inline-block;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    padding: 0.5rem 0.75rem;
  }
}

/* Extra small devices (phones in portrait mode) */
@media (max-width: 360px) {
  .service-log {
    width: 100px;
  }
  
  .device-icon svg {
    width: 28px !important;
    height: 28px !important;
  }
  
  .bg-\[\#e81b5b\].rounded-full {
    width: 50px !important;
    height: 50px !important;
    padding: 0.75rem !important;
  }
  
  .bg-\[\#e81b5b\].rounded-full svg {
    width: 32px !important;
    height: 32px !important;
  }
}

/* Print styles */
@media print {
  .device-icons-container {
    display: none;
  }
}

@media (min-width: 320px) and (max-width: 380px) {
  .container {
       padding-bottom: 5rem;
  }
}