/* ==========================================================================
   GRS Consultancy - UK GDPR & Cookie Consent System
   ========================================================================== */

/* Floating Cookie Banner */
.grs-cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  max-width: 480px;
  width: calc(100% - 3rem);
  background: rgba(7, 22, 36, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 1.6rem 1.6rem 1.4rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(114, 207, 171, 0.15);
  color: #ffffff;
  z-index: 99999;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.grs-cookie-banner.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.grs-cookie-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(114, 207, 171, 0.12);
  border: 1px solid rgba(114, 207, 171, 0.3);
  color: #72cfab;
  padding: 0.28rem 0.65rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.grs-cookie-badge svg {
  display: block;
}

.grs-cookie-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.grs-cookie-desc {
  font-size: 0.85rem;
  line-height: 1.55;
  color: #94a3b8;
  margin: 0 0 1.25rem;
}

.grs-cookie-desc a {
  color: #72cfab;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.grs-cookie-desc a:hover {
  color: #a7f3d0;
}

.grs-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.grs-cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
}

.grs-cookie-btn-primary {
  background: #0d6b50;
  color: #ffffff;
  flex: 1 1 auto;
}

.grs-cookie-btn-primary:hover {
  background: #118161;
  box-shadow: 0 4px 14px rgba(13, 107, 80, 0.4);
  transform: translateY(-1px);
}

.grs-cookie-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #e2e8f0;
  flex: 1 1 auto;
}

.grs-cookie-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.grs-cookie-btn-text {
  background: transparent;
  color: #94a3b8;
  font-size: 0.78rem;
  padding: 0.5rem 0.7rem;
  width: 100%;
  text-align: center;
}

.grs-cookie-btn-text:hover {
  color: #e2e8f0;
  text-decoration: underline;
}

/* Modal Overlay for Preferences */
.grs-cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 12, 20, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.grs-cookie-modal-backdrop.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.grs-cookie-modal {
  background: #0b1a29;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem 2rem 1.8rem;
  color: #ffffff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(114, 207, 171, 0.2);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.grs-cookie-modal-backdrop.active .grs-cookie-modal {
  transform: translateY(0) scale(1);
}

.grs-cookie-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1.1rem;
}

.grs-cookie-modal-header h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
  color: #ffffff;
}

.grs-cookie-modal-header p {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
}

.grs-cookie-modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.grs-cookie-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* Category cards inside modal */
.grs-cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.grs-cookie-cat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  transition: border-color 0.2s ease;
}

.grs-cookie-cat:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.grs-cookie-cat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.grs-cookie-cat-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.grs-cookie-always-active {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #72cfab;
  background: rgba(114, 207, 171, 0.12);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

.grs-cookie-cat-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

/* Custom modern switch */
.grs-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.grs-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.grs-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #334155;
  border-radius: 24px;
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.grs-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.grs-toggle-switch input:checked + .grs-toggle-slider {
  background-color: #0d6b50;
}

.grs-toggle-switch input:checked + .grs-toggle-slider:before {
  transform: translateX(20px);
}

.grs-toggle-switch input:focus-visible + .grs-toggle-slider {
  box-shadow: 0 0 0 2px #72cfab;
}

.grs-cookie-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.25rem;
}

/* Form GDPR Reassurance Card */
.grs-gdpr-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #0d6b50;
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin-top: 1.1rem;
  margin-bottom: 0.5rem;
  text-align: left;
}

.grs-gdpr-card-icon {
  color: #0d6b50;
  flex-shrink: 0;
  margin-top: 2px;
}

.grs-gdpr-card-text {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.48;
}

.grs-gdpr-card-text strong {
  display: block;
  color: #071624;
  font-size: 0.82rem;
  margin-bottom: 0.2rem;
  font-weight: 700;
}

.grs-gdpr-card-text a {
  color: #0d6b50;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.grs-gdpr-card-text a:hover {
  color: #071624;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .grs-cookie-banner {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    width: auto;
    padding: 1.25rem 1.25rem 1.1rem;
  }
  .grs-cookie-actions {
    flex-direction: column;
    width: 100%;
  }
  .grs-cookie-btn {
    width: 100%;
  }
  .grs-cookie-modal {
    padding: 1.4rem;
  }
  .grs-cookie-modal-actions {
    flex-direction: column-reverse;
    width: 100%;
  }
  .grs-cookie-modal-actions .grs-cookie-btn {
    width: 100%;
  }
}
