/* ========================================
   Student Registration Plugin - Main CSS
   Aesthetic: Elegant Light — Pearl & Sky Blue
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600;700&family=Cairo:wght@400;600;700;900&display=swap');

:root {
  --sr-bg:          #f0f4ff;
  --sr-surface:     #ffffff;
  --sr-surface2:    #f7f9ff;
  --sr-border:      rgba(99, 149, 255, 0.22);
  --sr-border-glow: rgba(99, 149, 255, 0.5);
  --sr-accent:      #3b6fef;
  --sr-accent2:     #7c3aed;
  --sr-accent-soft: rgba(59,111,239,0.08);
  --sr-text:        #1e2a4a;
  --sr-text-muted:  #6b7fa8;
  --sr-success:     #10b981;
  --sr-error:       #ef4444;
  --sr-grad1:       linear-gradient(135deg, #3b6fef, #7c3aed);
  --sr-grad-soft:   linear-gradient(135deg, #eef2ff, #f5f0ff);
  --sr-shadow:      0 20px 60px rgba(59,111,239,0.10);
  --sr-shadow-sm:   0 4px 16px rgba(59,111,239,0.08);
  --sr-radius:      16px;
  --sr-font-label:  'Noto Naskh Arabic', serif;
  --sr-font-body:   'Cairo', sans-serif;
}

/* ---- Wrapper ---- */
.sr-wrapper {
  font-family: var(--sr-font-body);
  direction: rtl;
  min-height: 100vh;
  background: var(--sr-bg);
  background-image:
    radial-gradient(ellipse at 15% 15%, rgba(59,111,239,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(124,58,237,0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 0%,   rgba(99,149,255,0.05) 0%, transparent 40%);
  padding: 40px 20px 80px;
  position: relative;
  overflow: hidden;
}

/* Soft dot grid */
.sr-wrapper::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image:
    radial-gradient(circle, rgba(59,111,239,0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  z-index: 0;
}

/* ---- Form Container ---- */
.sr-form-container {
  max-width: 820px;
  margin: 0 auto;
  background: var(--sr-surface);
  border: 1px solid rgba(59,111,239,0.12);
  border-radius: 28px;
  padding: 52px 52px 42px;
  position: relative;
  z-index: 1;
  box-shadow: var(--sr-shadow), 0 2px 0 rgba(59,111,239,0.06);
  animation: sr-container-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.sr-form-container::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 55%; height: 3px;
  background: var(--sr-grad1);
  border-radius: 0 0 50px 50px;
  opacity: 0.7;
}

@keyframes sr-container-enter {
  from { opacity: 0; transform: translateY(40px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Header ---- */
.sr-header {
  text-align: center;
  margin-bottom: 45px;
}

.sr-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  background: var(--sr-grad1);
  border-radius: 20px;
  margin-bottom: 20px;
  animation: sr-icon-float 3s ease-in-out infinite;
  box-shadow: 0 8px 30px rgba(99,120,255,0.4);
}

.sr-header-icon svg {
  width: 36px; height: 36px;
  color: white;
  stroke: white;
}

@keyframes sr-icon-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-6px) rotate(3deg); }
}

.sr-title {
  font-size: 2.4rem;
  font-weight: 900;
  background: var(--sr-grad1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 10px;
  letter-spacing: -0.5px;
}

.sr-subtitle {
  color: var(--sr-text-muted);
  font-size: 1.05rem;
  margin: 0 0 20px;
  font-weight: 400;
  font-family: var(--sr-font-label);
}

.sr-header-line {
  width: 60px;
  height: 3px;
  background: var(--sr-grad1);
  border-radius: 2px;
  margin: 0 auto;
  animation: sr-line-expand 1s 0.5s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes sr-line-expand {
  from { width: 0; opacity: 0; }
  to   { width: 60px; opacity: 1; }
}

/* ---- Form Grid ---- */
.sr-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.sr-field-full { grid-column: 1 / -1; }

/* ---- Field Groups ---- */
.sr-field-group {
  position: relative;
  animation: sr-field-in 0.5s cubic-bezier(0.16,1,0.3,1) both;
}

.sr-field-group:nth-child(1)  { animation-delay: 0.05s; }
.sr-field-group:nth-child(2)  { animation-delay: 0.10s; }
.sr-field-group:nth-child(3)  { animation-delay: 0.15s; }
.sr-field-group:nth-child(4)  { animation-delay: 0.20s; }
.sr-field-group:nth-child(5)  { animation-delay: 0.25s; }
.sr-field-group:nth-child(6)  { animation-delay: 0.30s; }
.sr-field-group:nth-child(7)  { animation-delay: 0.35s; }
.sr-field-group:nth-child(8)  { animation-delay: 0.40s; }

@keyframes sr-field-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Labels ---- */
.sr-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--sr-text);
  font-family: var(--sr-font-label);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 9px;
  transition: color 0.3s ease;
  letter-spacing: 0.1px;
}

.sr-label-icon { font-size: 1rem; }

.sr-required {
  color: var(--sr-accent);
  font-size: 1.1rem;
  line-height: 1;
}

.sr-field-group:focus-within .sr-label { color: var(--sr-accent); }

/* ---- Input Wrapper ---- */
.sr-input-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

/* ---- Inputs ---- */
.sr-input {
  width: 100%;
  background: var(--sr-surface2);
  border: 1.5px solid rgba(59,111,239,0.18);
  color: var(--sr-text);
  font-family: var(--sr-font-body);
  font-size: 0.98rem;
  font-weight: 500;
  padding: 14px 18px;
  border-radius: 12px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  box-sizing: border-box;
  direction: rtl;
  position: relative;
  z-index: 1;
}

.sr-input::placeholder { color: rgba(107,127,168,0.5); }

.sr-input:focus {
  border-color: var(--sr-accent);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(59,111,239,0.10), 0 4px 16px rgba(59,111,239,0.08);
  transform: translateY(-1px);
}

.sr-input.sr-input-error {
  border-color: var(--sr-error) !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.12) !important;
  animation: sr-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes sr-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-5px); }
  40%       { transform: translateX(5px); }
  60%       { transform: translateX(-3px); }
  80%       { transform: translateX(3px); }
}

/* ---- Input Glow Effect ---- */
.sr-input-glow {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--sr-grad1);
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
  border-radius: 0 0 12px 12px;
  z-index: 2;
}

.sr-field-group:focus-within .sr-input-glow { transform: scaleX(1); }

/* ---- Select ---- */
.sr-select-wrapper { position: relative; }
.sr-select { appearance: none; cursor: pointer; }
.sr-select-arrow {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--sr-text-muted);
  font-size: 0.7rem;
  pointer-events: none;
  z-index: 3;
  transition: transform 0.3s ease;
}

.sr-select:focus ~ .sr-select-arrow { transform: translateY(-50%) rotate(180deg); }

.sr-select option {
  background: #ffffff;
  color: var(--sr-text);
}

/* ---- Error Messages ---- */
.sr-error-msg {
  display: block;
  color: var(--sr-error);
  font-size: 0.78rem;
  margin-top: 6px;
  font-weight: 500;
  min-height: 16px;
  transition: all 0.3s ease;
}

/* ---- Attendance Cards ---- */
.sr-attendance-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.sr-attendance-card {
  cursor: pointer;
  display: block;
}

.sr-attendance-card input[type="radio"] { display: none; }

.sr-attendance-content {
  background: var(--sr-surface2);
  border: 1.5px solid rgba(59,111,239,0.15);
  border-radius: 14px;
  padding: 18px 12px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  position: relative;
  overflow: hidden;
}

.sr-attendance-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--sr-grad1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sr-attendance-card:hover .sr-attendance-content {
  border-color: var(--sr-accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(59,111,239,0.14);
  background: #ffffff;
}

.sr-attendance-card input:checked + .sr-attendance-content {
  border-color: var(--sr-accent);
  background: #ffffff;
  box-shadow: 0 0 0 2px var(--sr-accent), 0 8px 25px rgba(59,111,239,0.18);
}

.sr-attendance-card input:checked + .sr-attendance-content::before { opacity: 0.06; }

.sr-attendance-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.sr-attendance-card:hover .sr-attendance-icon,
.sr-attendance-card input:checked + .sr-attendance-content .sr-attendance-icon {
  transform: scale(1.2);
}

.sr-attendance-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--sr-text);
  margin-bottom: 4px;
  position: relative; z-index: 1;
  font-family: var(--sr-font-label);
}

.sr-attendance-desc {
  font-size: 0.75rem;
  color: var(--sr-text-muted);
  position: relative; z-index: 1;
  line-height: 1.4;
  font-family: var(--sr-font-label);
}

/* ---- Submit Button ---- */
.sr-submit-wrapper {
  margin-top: 32px;
  text-align: center;
}

.sr-submit-btn {
  position: relative;
  background: var(--sr-grad1);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 18px 60px;
  font-family: var(--sr-font-label);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  overflow: hidden;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 28px rgba(59,111,239,0.30), 0 2px 0 rgba(59,111,239,0.2);
  min-width: 220px;
}

.sr-submit-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 40px rgba(59,111,239,0.38), 0 2px 0 rgba(59,111,239,0.2);
}

.sr-submit-btn:active { transform: translateY(0) scale(0.98); }

.sr-btn-shine {
  position: absolute;
  top: -50%; left: -100%;
  width: 60%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-20deg);
  animation: sr-shine 3s 1.5s ease-in-out infinite;
}

@keyframes sr-shine {
  0%   { left: -100%; }
  30%, 100% { left: 150%; }
}

/* ---- Spinner ---- */
.sr-spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: sr-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-left: 6px;
}

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

/* ---- Form Footer ---- */
.sr-form-footer {
  text-align: center;
  margin-top: 20px;
  color: var(--sr-text-muted);
  font-size: 0.82rem;
  font-family: var(--sr-font-label);
}

/* ---- Success State ---- */
.sr-success-message {
  text-align: center;
  padding: 50px 30px;
  animation: sr-success-pop 0.6s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes sr-success-pop {
  0%   { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

.sr-success-icon {
  width: 80px; height: 80px;
  background: var(--sr-success);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
  margin-bottom: 20px;
  box-shadow: 0 10px 40px rgba(34,211,160,0.4);
  animation: sr-success-bounce 1s 0.3s cubic-bezier(0.68,-0.55,0.27,1.55) both;
}

@keyframes sr-success-bounce {
  0%   { transform: scale(0) rotate(-180deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.sr-success-message h3 {
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--sr-grad1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 12px;
  font-family: var(--sr-font-label);
}

.sr-success-message p {
  color: var(--sr-text-muted);
  font-size: 1rem;
  font-family: var(--sr-font-label);
}

/* ========================================
   SOCIAL WIDGET
   ======================================== */

.sr-social-widget {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 9999;
  direction: rtl;
}

.sr-social-toggle {
  width: 62px; height: 62px;
  background: var(--sr-grad1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(99,120,255,0.5);
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  position: relative;
  z-index: 2;
  color: white;
}

.sr-toggle-icon svg { width: 26px; height: 26px; }

.sr-social-toggle:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 35px rgba(99,120,255,0.6);
}

.sr-toggle-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(99,120,255,0.4);
  animation: sr-pulse 2s ease-out infinite;
}

@keyframes sr-pulse {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.sr-social-links {
  position: absolute;
  bottom: 75px;
  left: 0;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}

.sr-social-links.sr-open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.sr-social-link {
  width: 50px; height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  position: relative;
}

.sr-social-link svg { width: 22px; height: 22px; fill: white; }

.sr-social-link:hover { transform: scale(1.15) translateX(-5px); }

/* Tooltip */
.sr-social-link::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 62px;
  white-space: nowrap;
  background: rgba(255,255,255,0.97);
  color: var(--sr-text);
  font-family: var(--sr-font-label);
  font-size: 0.82rem;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(59,111,239,0.15);
  box-shadow: 0 4px 12px rgba(59,111,239,0.12);
  opacity: 0;
  transform: translateX(8px);
  transition: all 0.2s ease;
  pointer-events: none;
}

.sr-social-link:hover::after { opacity: 1; transform: translateX(0); }

/* Individual Colors */
.sr-link-phone    { background: linear-gradient(135deg, #34d399, #059669); }
.sr-link-whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); }
.sr-link-messenger{ background: linear-gradient(135deg, #0084ff, #00b2ff); }
.sr-link-instagram{ background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.sr-link-youtube  { background: linear-gradient(135deg, #ff0000, #cc0000); }
.sr-link-tiktok   { background: linear-gradient(135deg, #010101, #69c9d0, #ee1d52); }

.sr-social-label {
  text-align: center;
  font-family: var(--sr-font-label);
  font-size: 0.65rem;
  color: #8899bb;
  margin-top: 5px;
  font-weight: 600;
}

/* Animation delays for links */
.sr-social-link:nth-child(1) { transition-delay: 0.05s; }
.sr-social-link:nth-child(2) { transition-delay: 0.10s; }
.sr-social-link:nth-child(3) { transition-delay: 0.15s; }
.sr-social-link:nth-child(4) { transition-delay: 0.20s; }
.sr-social-link:nth-child(5) { transition-delay: 0.25s; }
.sr-social-link:nth-child(6) { transition-delay: 0.30s; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .sr-form-container { padding: 30px 22px; }
  .sr-form-grid { grid-template-columns: 1fr; }
  .sr-field-full { grid-column: 1; }
  .sr-title { font-size: 1.8rem; }
  .sr-attendance-options { grid-template-columns: 1fr; }
  .sr-submit-btn { width: 100%; }
}

/* ========================================
   NOTICE BANNER
   ======================================== */
.sr-notice-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(239,68,68,0.06));
  border: 1.5px solid rgba(245,158,11,0.35);
  border-right: 4px solid #f59e0b;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 28px;
  animation: sr-field-in 0.5s ease both;
}

.sr-notice-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.sr-notice-text {
  color: #92400e;
  font-family: var(--sr-font-label);
  font-size: 0.97rem;
  font-weight: 600;
  line-height: 1.6;
}

/* ========================================
   TELEGRAM + TWITTER + FACEBOOK COLORS
   ======================================== */
.sr-link-telegram { background: linear-gradient(135deg, #229ed9, #0088cc); }
.sr-link-facebook  { background: linear-gradient(135deg, #1877f2, #0d5ed9); }
.sr-link-twitter   { background: linear-gradient(135deg, #000000, #333333); }

/* ========================================
   FAKE BOOKING NOTIFICATION
   ======================================== */
.sr-fake-notif {
  position: fixed;
  bottom: 110px;
  left: 22px;
  z-index: 99999;
  background: #ffffff;
  border: 1px solid rgba(59,111,239,0.18);
  border-radius: 16px;
  padding: 14px 16px 14px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(59,111,239,0.15), 0 2px 8px rgba(0,0,0,0.08);
  min-width: 240px;
  max-width: 300px;
  direction: rtl;
  animation: sr-notif-slide 0.4s cubic-bezier(0.16,1,0.3,1);
}

@keyframes sr-notif-slide {
  from { opacity: 0; transform: translateX(-30px) scale(0.92); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

.sr-notif-avatar {
  font-size: 2rem;
  flex-shrink: 0;
}

.sr-notif-body { flex: 1; }

.sr-notif-name {
  font-family: var(--sr-font-label);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--sr-text);
}

.sr-notif-msg {
  font-family: var(--sr-font-label);
  font-size: 0.8rem;
  color: var(--sr-text-muted);
  margin-top: 2px;
}

.sr-notif-close {
  font-size: 0.75rem;
  color: var(--sr-text-muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.2s;
}

.sr-notif-close:hover { color: var(--sr-error); }

/* More social links — adjust nth-child delays */
.sr-social-link:nth-child(7) { transition-delay: 0.35s; }
.sr-social-link:nth-child(8) { transition-delay: 0.40s; }
.sr-social-link:nth-child(9) { transition-delay: 0.45s; }

/* ---- Cash & InstaPay icons ---- */
.sr-link-cash     { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.sr-link-instapay { background: linear-gradient(135deg, #9b59b6, #6c3483); }
.sr-link-cash:hover     { background: linear-gradient(135deg, #27ae60, #1e8449); }
.sr-link-instapay:hover { background: linear-gradient(135deg, #6c3483, #4a235a); }

.sr-social-link:nth-child(10) { transition-delay: 0.50s; }
.sr-social-link:nth-child(11) { transition-delay: 0.55s; }

/* ---- Copy toast ---- */
.sr-copy-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,0.82);
  color: #fff;
  padding: 10px 22px;
  border-radius: 30px;
  font-size: 0.92rem;
  font-family: var(--sr-font-label, sans-serif);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 99999;
}
.sr-copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
