/* Lavrilo Authentication Modal Styles */

.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  overflow-y: auto;
  padding: 20px;
}

.auth-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.auth-modal {
  background: white;
  border-radius: 20px;
  padding: 40px;
  width: 90%;
  max-width: 450px;
  max-height: 90vh;
  position: relative;
  transform: translateY(30px);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  margin: auto;
}

.auth-modal-overlay.active .auth-modal {
  transform: translateY(0);
}

.auth-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  line-height: 1;
  padding: 5px;
}

.auth-modal-close:hover {
  color: #ff4757;
}

.auth-modal h2 {
  text-align: center;
  margin: 0 0 30px 0;
  color: #2c3e50;
  font-size: 28px;
  font-weight: 600;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form-group label {
  font-weight: 500;
  color: #2c3e50;
  font-size: 14px;
}

.auth-form-group input,
.auth-form-group select {
  padding: 15px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.auth-form-group select {
  background: white;
  cursor: pointer;
}

.auth-form-group input:focus,
.auth-form-group select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 68, 88, 0.1);
}

.auth-form-group input.error,
.auth-form-group select.error {
  border-color: #ff4757;
  background-color: #fef2f2;
}

.auth-checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.auth-checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ff4757;
}

.auth-checkbox-group label {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.auth-submit-btn {
  background: linear-gradient(135deg, #ff4757, #ff6b7a);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.auth-submit-btn:hover {
  background: linear-gradient(135deg, #ff3742, #ff5767);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255, 71, 87, 0.3);
}

.auth-submit-btn:disabled {
  background: #cbd5e0;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-error-message {
  background: #fef2f2;
  color: #dc2626;
  padding: 12px;
  border-radius: 8px;
  border-left: 4px solid #dc2626;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}

.auth-error-message.show {
  display: block;
}

.auth-success-message {
  background: #f0fdf4;
  color: #166534;
  padding: 12px;
  border-radius: 8px;
  border-left: 4px solid #16a34a;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}

.auth-success-message.show {
  display: block;
}

.auth-modal-footer {
  text-align: center;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.auth-footer-link {
  color: #ff4757;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s ease;
}

.auth-footer-link:hover {
  color: #ff3742;
  text-decoration: underline;
}

.auth-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #ffffff40;
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* User Menu Styles */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-info {
  position: relative;
}

.user-name {
  color: white;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  padding: 10px 15px;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.3s ease;
}

.user-name:hover {
  background: rgba(255, 255, 255, 0.2);
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  padding: 10px 0;
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.user-info:hover .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown button {
  width: 100%;
  padding: 12px 20px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  color: #2c3e50;
  transition: background 0.3s ease;
}

.user-dropdown button:hover {
  background: #f8f9fa;
}

.user-dropdown button.logout-btn:hover {
  background: #fef2f2;
  color: #dc2626;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .auth-modal-overlay {
    padding: 10px;
    align-items: flex-start;
    padding-top: 50px;
  }
  
  .auth-modal {
    padding: 25px 20px;
    width: 95%;
    max-height: 85vh;
    margin: 0;
    transform: translateY(0);
  }
  
  .auth-modal-overlay.active .auth-modal {
    transform: translateY(0);
  }
  
  .auth-modal h2 {
    font-size: 24px;
    margin-bottom: 20px;
  }
  
  .auth-form {
    gap: 15px;
  }
  
  .auth-form-group input,
  .auth-form-group select {
    padding: 12px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .user-menu {
    position: relative;
  }
  
  .user-dropdown {
    right: auto;
    left: 0;
  }
}