/*
 * Premium Aesthetics for SWVT Login Form
 * RTL friendly design
 */

:root {
  --swvt-primary-gradient: #1d5bd8;
  --swvt-primary-color: #1d5bd8;
  --swvt-primary-hover: #1d5bd8;
  --swvt-bg-card: rgba(255, 255, 255, 0.95);
  --swvt-border-color: #e2e8f0;
  --swvt-text-main: #1e293b;
  --swvt-text-muted: #64748b;
  --swvt-shadow: none;
  --swvt-font-arabic: system-ui, sans-serif;
  --swvt-font-latin: system-ui, sans-serif;
  --swvt-success: #10b981;
  --swvt-error: #ef4444;
}

.swvt-login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 20px 0;
  direction: rtl;
  font-family: var(--swvt-font-arabic);
}

.swvt-login-card {
  background: var(--swvt-bg-card);
  border: none;
  border-radius: 20px;
  box-shadow: var(--swvt-shadow);
  width: 100%;
  max-width: 420px;
  padding: 30px;
  transition: all 0.3s ease;
  overflow: hidden;
  backdrop-filter: none;
}

.swvt-card-header {
  text-align: center;
  margin-bottom: 25px;
}

.swvt-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--swvt-text-main);
  margin-bottom: 8px;
}

.swvt-desc {
  font-size: 14px;
  color: var(--swvt-text-muted);
  line-height: 1.5;
}

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

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

.swvt-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--swvt-text-main);
}

.swvt-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.swvt-input {
  width: 100%;
  padding: 12px 40px 12px 16px;
  font-size: 15px;
  font-family: var(--swvt-font-latin);
  border: 2px solid var(--swvt-border-color);
  border-radius: 12px;
  background-color: #f8fafc;
  color: var(--swvt-text-main);
  transition: all 0.2s ease;
  outline: none;
}

.swvt-input:focus {
  border-color: var(--swvt-primary-color);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.swvt-input-icon {
  position: absolute;
  right: 14px;
  font-size: 18px;
  color: var(--swvt-text-muted);
  pointer-events: none;
}

/* OTP specific text align center */
.otp-input-text {
  text-align: center;
  font-size: 24px;
  letter-spacing: 6px;
  padding: 12px;
}

.swvt-btn {
  background: var(--swvt-primary-gradient);
  color: #fff !important;
  font-family: var(--swvt-font-arabic);
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: all 0.25s ease;
  box-shadow: none;
  text-decoration: none;
  text-align: center;
}

.swvt-btn:hover {
  transform: none;
  box-shadow: none;
  opacity: 1;
}

.swvt-btn:active {
  transform: translateY(0);
}

.swvt-btn:disabled {
  background: #cbd5e1;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* Button Loading Spinner */
.btn-loader {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: swvt-spin 0.8s ease-in-out infinite;
}

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

/* Alert States */
.swvt-alert {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.5;
  animation: swvt-slide-in 0.3s ease;
}

.swvt-alert-success {
  background-color: #ecfdf5;
  border: 1px solid #d1fae5;
  color: #065f46;
}

.swvt-alert-error {
  background-color: #fef2f2;
  border: 1px solid #fee2e2;
  color: #991b1b;
}

@keyframes swvt-slide-in {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Links */
.swvt-resend-container {
  text-align: center;
  font-size: 14px;
  color: var(--swvt-text-muted);
  margin-top: 10px;
}

.swvt-resend-link {
  color: var(--swvt-primary-color);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s;
}

.swvt-resend-link:hover {
  color: var(--swvt-primary-hover);
  text-decoration: underline;
}

.swvt-back-link {
  text-align: center;
  color: var(--swvt-text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  margin-top: 15px;
  display: block;
  transition: color 0.2s;
}

.swvt-forgot-link {
  text-align: center;
  color: var(--swvt-primary-color);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  display: block;
  margin-top: 10px;
  transition: color 0.2s;
}

.swvt-forgot-link:hover {
  color: var(--swvt-primary-hover);
}

.swvt-back-link:hover {
  color: var(--swvt-text-main);
}

/* Checkmark Success Animation */
.swvt-success-checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
}

.swvt-check-icon {
  width: 80px;
  height: 80px;
  position: relative;
  border-radius: 50%;
  box-sizing: content-box;
  border: 4px solid #4caf50;
}

.swvt-check-icon::before, .swvt-check-icon::after {
  content: '';
  height: 100px;
  position: absolute;
  background: #ffffff;
  transform: rotate(-45deg);
}

.swvt-check-icon::before {
  border-radius: 100px 0 0 100px;
  top: -7px;
  left: -9px;
  transform-origin: 100% 50%;
  transform: rotate(-45deg);
}

.swvt-check-icon::after {
  border-radius: 0 100px 100px 0;
  top: -11px;
  left: 30px;
  transform-origin: 0 50%;
  transform: rotate(-45deg);
}

.swvt-icon-line {
  height: 5px;
  background-color: #4caf50;
  display: block;
  border-radius: 2px;
  position: absolute;
  z-index: 10;
}

.swvt-icon-line.swvt-icon-tip {
  width: 25px;
  left: 14px;
  top: 46px;
  transform: rotate(45deg);
}

.swvt-icon-line.swvt-icon-long {
  width: 47px;
  right: 8px;
  top: 38px;
  transform: rotate(-45deg);
}

.swvt-icon-circle {
  width: 80px;
  height: 80px;
  border: 4px solid rgba(76, 175, 80, 0.5);
  border-radius: 50%;
  box-sizing: content-box;
  position: absolute;
  left: -4px;
  top: -4px;
  z-index: 2;
}

.swvt-icon-fix {
  width: 5px;
  height: 90px;
  background-color: #ffffff;
  position: absolute;
  left: 28px;
  top: -8px;
  z-index: 1;
  transform: rotate(-45deg);
}

.logged-in {
  text-align: center;
}
.logged-in .swvt-btn {
  margin-top: 20px;
}
