/* Enhanced Authentication Pages Styling
   Created for OneSuite RGI - UI/UX Enhancement Project
   This file contains enhanced animations and styling for login, register, and custom pages
*/

/* Global Animation Keyframes */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Enhanced Login/Register Background */
.custom-login {
  background: linear-gradient(135deg, #0e5cad 0%, #1976d2 50%, #2196f3 100%);
  background-size: 200% 200%;
  animation: gradientBG 15s ease infinite;
}

.login-bg-img img.login-bg-1 {
  animation: float 6s ease-in-out infinite;
}

.login-bg-img img.login-bg-2 {
  animation: float 8s ease-in-out infinite;
}

/* Enhanced Card Styling */
.custom-login .custom-wrapper .card .card-body {
  border-radius: 20px !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  animation: fadeIn 0.8s ease-out;
}

.custom-login .custom-wrapper .card .card-body:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Form Elements Animation */
.custom-login h2 {
  animation: slideInUp 0.6s ease-out;
  position: relative;
}

.custom-login h2:after {
  content: '';
  position: absolute;
  width: 50px;
  height: 3px;
  background: var(--bs-primary);
  bottom: -10px;
  left: 0;
  border-radius: 3px;
  animation: slideInLeft 0.8s ease-out;
}

.custom-login .form-group {
  animation: slideInUp 0.7s ease-out;
  animation-fill-mode: both;
}

.custom-login .form-group:nth-child(2) {
  animation-delay: 0.1s;
}

.custom-login .form-group:nth-child(3) {
  animation-delay: 0.2s;
}

.custom-login .form-group:nth-child(4) {
  animation-delay: 0.3s;
}

.custom-login .form-check {
  animation: slideInUp 0.7s ease-out;
  animation-delay: 0.4s;
  animation-fill-mode: both;
}

.custom-login .d-grid {
  animation: slideInUp 0.7s ease-out;
  animation-delay: 0.5s;
  animation-fill-mode: both;
}

.custom-login p.my-4 {
  animation: slideInUp 0.7s ease-out;
  animation-delay: 0.6s;
  animation-fill-mode: both;
}

/* Enhanced Form Controls */
.custom-login .form-control {
  border-radius: 10px;
  padding: 12px 15px;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
}

.custom-login .form-control:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
  transform: translateY(-2px);
}

.custom-login .form-label {
  font-weight: 500;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.custom-login .form-control:focus + .form-label,
.custom-login .form-control:not(:placeholder-shown) + .form-label {
  color: var(--bs-primary);
}

/* Enhanced Button Styling */
.custom-login .btn-primary {
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.custom-login .btn-primary:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.4s ease;
  z-index: -1;
}

.custom-login .btn-primary:hover:before {
  left: 100%;
}

.custom-login .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.1);
}

.custom-login .btn-primary:active {
  transform: translateY(1px);
}

/* Custom Pages Enhancement */
.common-banner {
  position: relative;
  overflow: hidden;
  animation: fadeIn 1s ease-out;
  background: linear-gradient(135deg, #0e5cad 0%, #1976d2 50%, #2196f3 100%);
  background-size: 200% 200%;
  animation: gradientBG 15s ease infinite;
  padding: 60px 0;
  margin-bottom: 30px;
}

.common-banner:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../images/auth/common.svg') no-repeat bottom right;
  background-size: contain;
  opacity: 0.1;
  z-index: 1;
}

.common-banner .title {
  position: relative;
  z-index: 2;
  animation: slideInUp 0.8s ease-out;
}

.common-banner .title h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0;
  position: relative;
  display: inline-block;
}

.common-banner .title h1:after {
  content: '';
  position: absolute;
  width: 50px;
  height: 4px;
  background: #fff;
  bottom: -10px;
  left: 0;
  border-radius: 4px;
  animation: slideInLeft 1s ease-out;
}

.static-content {
  animation: fadeIn 1.2s ease-out;
  padding: 40px 0;
}

.static-content p {
  line-height: 1.8;
  font-size: 1.05rem;
  color: #555;
}

.custom-page-content h1,
.custom-page-content h2,
.custom-page-content h3,
.custom-page-content h4,
.custom-page-content h5,
.custom-page-content h6 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #333;
  position: relative;
}

.custom-page-content h2 {
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.custom-page-content h2:after {
  content: '';
  position: absolute;
  width: 70px;
  height: 3px;
  background: var(--bs-primary);
  bottom: -1px;
  left: 0;
  border-radius: 3px;
}

.custom-page-content ul,
.custom-page-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.custom-page-content ul li,
.custom-page-content ol li {
  margin-bottom: 0.5rem;
}

.custom-page-content blockquote {
  border-left: 4px solid var(--bs-primary);
  padding: 15px 20px;
  background: #f8f9fa;
  margin: 20px 0;
  border-radius: 0 5px 5px 0;
  font-style: italic;
}

/* Scroll Animation for Long Content */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.scroll-reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Divider Styling */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e0e0e0;
}

.divider::before {
  margin-right: 10px;
}

.divider::after {
  margin-left: 10px;
}

.divider-text {
  padding: 0 10px;
  color: #6c757d;
  font-size: 0.9rem;
}

/* Password Toggle Button */
.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #6c757d;
  cursor: pointer;
  z-index: 10;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:focus {
  outline: none;
}

.input-group .password-toggle {
  right: 45px;
}

/* Input Focus Animation */
.input-focused label {
  color: var(--bs-primary);
  transform: translateY(-5px);
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
  .custom-login .custom-wrapper .card .card-body {
    padding: 25px 20px;
  }

  .custom-login h2:after {
    width: 40px;
  }

  .common-banner {
    padding: 40px 0;
  }

  .common-banner .title h1 {
    font-size: 2rem;
  }
}
