/**
 * Shared CSS - Переиспользуемые стили для всех лендингов
 * 
 * Включает:
 * - CSS переменные (colors, transitions, radius, spacing)
 * - Utility классы (glass-effect, hover-lift и т.д.)
 * - Стили popup модальных окон
 * - Стили floating button для мобильных
 * - Стили для phone validation errors
 */

/* ============================================================================
   CSS ПЕРЕМЕННЫЕ
   ============================================================================ */

:root{
  /* Colors */
  --bg:#000000;
  --text:#ffffff;
  --muted:#cfd2d6;
  --accent:#1eef53;
  --glass: rgba(255,255,255,0.10);
  --glass-border: rgba(255,255,255,0.22);
  --ring: rgba(30,239,83,0.55);
  --shadow: 0 0 40px rgba(255,255,255,0.08);
  
  /* Transitions */
  --transition-fast: .2s ease;
  --transition-normal: .3s ease;
  --transition-slow: .4s ease;
  --transition-cubic: .4s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Border radius */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 50%;
  
  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
}

/* ============================================================================
   BASE STYLES
   ============================================================================ */

*{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.glass-effect{
  background: var(--glass);
  border:1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.hover-lift{
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.hover-lift:hover{
  transform: translateY(-4px);
}

.btn-full-width{
  width:100%;
}

/* ============================================================================
   PHONE VALIDATION ERRORS
   ============================================================================ */

.phone-error-msg{
  display:none;
  margin-top:8px;
  color:#ef4444;
  font-size:13px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
}

input.phone-error,
.popup-input.phone-error,
.cta-input.phone-error{
  border-color:#ef4444 !important;
  background:rgba(239,68,68,0.08) !important;
}

/* ============================================================================
   POPUP MODAL STYLES
   ============================================================================ */

.popup-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.92);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  opacity:0;
  visibility:hidden;
  transition:all 0.3s ease;
}

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

.popup-modal{
  background:linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  border-radius:24px;
  max-width:600px;
  width:100%;
  max-height:90vh;
  overflow-y:auto;
  position:relative;
  border:1px solid rgba(30,239,83,0.2);
  box-shadow:0 20px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(30,239,83,0.1);
  transform:scale(0.9) translateY(20px);
  transition:all 0.3s ease;
}

.popup-overlay.active .popup-modal{
  transform:scale(1) translateY(0);
}

.popup-close{
  position:absolute;
  top:20px;
  right:20px;
  width:40px;
  height:40px;
  border-radius:50%;
  background:rgba(255,255,255,0.1);
  border:1px solid rgba(255,255,255,0.2);
  color:var(--text);
  font-size:28px;
  line-height:1;
  cursor:pointer;
  transition:all 0.3s ease;
  z-index:10;
  display:flex;
  align-items:center;
  justify-content:center;
}

.popup-close:hover{
  background:rgba(255,255,255,0.15);
  border-color:var(--accent);
  transform:rotate(90deg);
}

.popup-content{
  padding:48px 40px;
}

.popup-title{
  font-size:32px;
  font-weight:800;
  text-align:center;
  margin:0 0 16px;
  background:linear-gradient(135deg, #ffffff, var(--accent));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  line-height:1.2;
}

.popup-subtitle{
  font-size:17px;
  color:var(--muted);
  text-align:center;
  margin:0 0 32px;
  line-height:1.6;
}

.popup-form-group{
  margin-bottom:20px;
}

.popup-label{
  display:block;
  font-size:14px;
  font-weight:600;
  color:var(--text);
  margin-bottom:8px;
}

.popup-input{
  width:100%;
  padding:16px 20px;
  border-radius:16px;
  background:rgba(255,255,255,0.05);
  border:2px solid rgba(255,255,255,0.1);
  color:var(--text);
  font-size:16px;
  font-family:inherit;
  transition:all 0.3s ease;
  box-sizing:border-box;
}

.popup-input:focus{
  outline:none;
  border-color:var(--accent);
  background:rgba(255,255,255,0.08);
  box-shadow:0 0 0 4px rgba(30,239,83,0.1);
}

.popup-input::placeholder{
  color:rgba(255,255,255,0.4);
}

.popup-submit{
  width:100%;
  padding:18px 32px;
  border-radius:16px;
  background:var(--accent);
  color:#0a0a0a;
  border:none;
  font-size:18px;
  font-weight:700;
  cursor:pointer;
  transition:all 0.3s ease;
  margin-top:8px;
  box-shadow:0 8px 32px rgba(30,239,83,0.4);
}

.popup-submit:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 40px rgba(30,239,83,0.6);
}

.popup-submit:active{
  transform:translateY(0);
}

.popup-submit:disabled{
  opacity:0.6;
  cursor:not-allowed;
  transform:none;
}

.popup-submit.shake{
  animation: shake 0.5s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.popup-success,
.popup-error{
  text-align:center;
  padding:40px 20px;
}

.popup-success-icon,
.popup-error-icon{
  width:80px;
  height:80px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto 20px;
  font-size:48px;
  font-weight:700;
}

.popup-success-icon{
  background:rgba(30,239,83,0.15);
  color:var(--accent);
  border:3px solid var(--accent);
}

.popup-error-icon{
  background:rgba(239,68,68,0.15);
  color:#ef4444;
  border:3px solid #ef4444;
}

.popup-success h3,
.popup-error h3{
  font-size:24px;
  margin:0 0 12px;
  font-weight:700;
}

.popup-success p,
.popup-error p{
  font-size:16px;
  color:var(--muted);
  margin:0;
  line-height:1.5;
}

/* Mobile popup styles */
@media (max-width:640px){
  .popup-modal{
    border-radius:20px;
    max-height:95vh;
  }
  .popup-content{
    padding:32px 24px;
  }
  .popup-title{
    font-size:24px;
    margin:0 0 12px;
  }
  .popup-subtitle{
    font-size:15px;
    margin:0 0 24px;
  }
  .popup-close{
    top:16px;
    right:16px;
    width:36px;
    height:36px;
    font-size:24px;
  }
  .popup-input{
    padding:14px 16px;
    font-size:15px;
    border-radius:12px;
  }
  .popup-submit{
    padding:16px 24px;
    font-size:16px;
    border-radius:12px;
  }
  .popup-form-group{
    margin-bottom:16px;
  }
  .popup-success-icon,
  .popup-error-icon{
    width:64px;
    height:64px;
    font-size:36px;
  }
  .popup-success h3,
  .popup-error h3{
    font-size:20px;
  }
}

/* ============================================================================
   FLOATING BUTTON FOR MOBILE
   ============================================================================ */

.floating-btn{
  display:none;
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  width:100%;
  max-width:100vw;
  z-index:99;
  padding:12px 16px;
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top:1px solid rgba(30,239,83,0.3);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
  opacity:0;
  transform: translateY(100%);
  transition: all .3s ease;
  box-sizing:border-box;
}

.floating-btn.visible{
  opacity:1;
  transform: translateY(0);
}

.floating-btn button{
  width:100%;
  max-width:100%;
  padding:14px var(--spacing-lg);
  border-radius:var(--radius-sm);
  background:var(--accent);
  color:#0a0a0a;
  border:none;
  font-weight:700;
  font-size:16px;
  cursor:pointer;
  box-shadow:0 4px 20px rgba(30,239,83,.4);
  transition: var(--transition-normal);
  box-sizing:border-box;
}

.floating-btn button:active{
  transform: scale(0.98);
}

@media (max-width: 768px){
  .floating-btn{
    display:block;
  }
}

