/* ============================================
   NEW GLAS 2026 - FOS Contact Forms
   Refined minimal aesthetic with glass effects
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');

:root {
  --fos-primary: #0088cc;
  --fos-primary-dark: #0A7EA3;
  --fos-primary-light: #00BCD4;
  --fos-dark: #1a252f;
  --fos-dark-alt: #2c3e50;
  --fos-bg-light: #f0f4f8;
  --fos-white: #ffffff;
  --fos-text: #34495e;
  --fos-text-light: #5c7080;
  --fos-border: #dce5ec;
  --fos-error: #e74c3c;
  --fos-success: #27ae60;
}

/* ============================================
   INLINE FORM - [fos]
   ============================================ */

.ng-fos-inline {
  max-width: 580px;
  margin: 40px auto;
  padding: 45px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbfd 100%);
  border: 1px solid var(--fos-border);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(10, 126, 163, 0.08);
  font-family: 'DM Sans', -apple-system, sans-serif;
  position: relative;
  overflow: hidden;
}

.ng-fos-inline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--fos-primary-dark) 0%, var(--fos-primary-light) 100%);
}

.ng-fos-inline-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--fos-dark);
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.ng-fos-inline-subtitle {
  font-size: 15px;
  color: var(--fos-text-light);
  margin: 0 0 32px 0;
  line-height: 1.5;
}

.ng-fos-field {
  margin-bottom: 20px;
  position: relative;
}

.ng-fos-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--fos-dark);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.ng-fos-input,
.ng-fos-textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  font-family: 'DM Sans', sans-serif;
  color: var(--fos-dark);
  background: var(--fos-white);
  border: 2px solid var(--fos-border);
  border-radius: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  outline: none;
}

.ng-fos-input:focus,
.ng-fos-textarea:focus {
  border-color: var(--fos-primary);
  background: #fafcfd;
  box-shadow: 0 0 0 4px rgba(0, 136, 204, 0.08);
  transform: translateY(-1px);
}

.ng-fos-input::placeholder,
.ng-fos-textarea::placeholder {
  color: #a8b8c5;
  opacity: 1;
}

.ng-fos-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.ng-fos-button {
  width: 100%;
  padding: 16px 24px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fos-white);
  background: linear-gradient(135deg, var(--fos-primary) 0%, var(--fos-primary-dark) 100%);
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(0, 136, 204, 0.25);
  position: relative;
  overflow: hidden;
}

.ng-fos-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.ng-fos-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 136, 204, 0.35);
}

.ng-fos-button:hover::before {
  left: 100%;
}

.ng-fos-button:active {
  transform: translateY(0);
}

.ng-fos-button.loading {
  pointer-events: none;
  opacity: 0.7;
}

.ng-fos-button-text {
  display: inline-block;
  transition: opacity 0.3s;
}

.ng-fos-button.loading .ng-fos-button-text {
  opacity: 0;
}

.ng-fos-spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--fos-white);
  border-radius: 50%;
  animation: fos-spin 0.8s linear infinite;
}

.ng-fos-button.loading .ng-fos-spinner {
  display: block;
}

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

.ng-fos-alert {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  display: none;
  animation: fos-slide-in 0.3s ease;
}

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

.ng-fos-alert.success {
  display: block;
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.ng-fos-alert.error {
  display: block;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ============================================
   MODAL FORM - [fosbutton]
   ============================================ */

.ng-fos-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 37, 47, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  animation: fos-fade-in 0.3s ease;
  overflow-y: auto;
  padding: 20px;
}

.ng-fos-modal-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fos-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ng-fos-modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: var(--fos-white);
  border-radius: 0;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  animation: fos-modal-enter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

@keyframes fos-modal-enter {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.ng-fos-modal-header {
  padding: 35px 40px 25px;
  background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
  position: relative;
}

.ng-fos-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ng-fos-modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg);
}

.ng-fos-modal-close::before,
.ng-fos-modal-close::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 2px;
  background: var(--fos-white);
  border-radius: 1px;
}

.ng-fos-modal-close::before {
  transform: rotate(45deg);
}

.ng-fos-modal-close::after {
  transform: rotate(-45deg);
}

.ng-fos-modal-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--fos-white);
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.ng-fos-modal-subtitle {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  line-height: 1.5;
}

.ng-fos-modal-body {
  padding: 35px 40px 40px;
}

.ng-fos-modal .ng-fos-field {
  margin-bottom: 20px;
}

.ng-fos-modal .ng-fos-button {
  margin-top: 8px;
}

/* Responsive */
@media (max-width: 640px) {
  .ng-fos-inline {
    padding: 30px 20px;
    margin: 20px;
  }

  .ng-fos-inline-title,
  .ng-fos-modal-title {
    font-size: 22px;
  }

  .ng-fos-modal-header {
    padding: 25px 24px 20px;
  }

  .ng-fos-modal-body {
    padding: 25px 24px 30px;
  }

  .ng-fos-modal {
    margin: 20px 0;
  }

  .ng-fos-modal-overlay {
    align-items: flex-start;
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .ng-fos-input,
  .ng-fos-textarea {
    font-size: 16px; /* Prevent zoom on iOS */
  }
}

/* Input validation states */
.ng-fos-input.error,
.ng-fos-textarea.error {
  border-color: var(--fos-error);
}

.ng-fos-input.error:focus,
.ng-fos-textarea.error:focus {
  box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.08);
}

.ng-fos-field-error {
  display: none;
  font-size: 13px;
  color: var(--fos-error);
  margin-top: 6px;
}

.ng-fos-field.has-error .ng-fos-field-error {
  display: block;
}

/* Privacy text styling */
.ng-fos-privacy {
  font-size: 12px;
  color: var(--fos-text);
  text-align: center;
  margin: 12px 0 0 0;
  line-height: 1.5;
  opacity: 0.9;
}
