/* Advanced Cookie Consent Modal - City Hostel */

/* Modal Container */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cookie-modal.show {
  opacity: 1;
  visibility: visible;
}

.cookie-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

/* Modal Content */
.cookie-modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.cookie-modal.show .cookie-modal-content {
  transform: scale(1) translateY(0);
}

/* Header */
.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.cookie-modal-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cookie-icon {
  font-size: 1.5rem;
}

.cookie-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.cookie-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6b7280;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cookie-modal-close:hover {
  background: #e5e7eb;
  color: #374151;
}

/* Tabs */
.cookie-modal-tabs {
  display: flex;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.cookie-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
}

.cookie-tab:hover {
  color: #374151;
  background: #f1f5f9;
}

.cookie-tab.active {
  color: var(--accent2, #7ed321);
  border-bottom-color: var(--accent2, #7ed321);
  background: white;
}

/* Modal Body */
.cookie-modal-body {
  padding: 2rem;
  max-height: 50vh;
  overflow-y: auto;
}

.cookie-tab-content {
  display: none;
}

.cookie-tab-content.active {
  display: block;
}

/* Cookie Intro */
.cookie-intro {
  margin-bottom: 2rem;
}

.cookie-intro p {
  color: #4b5563;
  line-height: 1.6;
  margin: 0;
}

/* Cookie Categories */
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cookie-category {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.cookie-category:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cookie-category-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-category-info {
  flex: 1;
}

.cookie-category-info h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
}

.cookie-category-info p {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Toggle Switches */
.cookie-toggle {
  flex-shrink: 0;
}

.cookie-toggle input[type="checkbox"] {
  display: none;
}

.toggle-label {
  display: block;
  width: 48px;
  height: 24px;
  background: #d1d5db;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.toggle-label::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input[type="checkbox"]:checked + .toggle-label {
  background: var(--accent2, #7ed321);
}

.cookie-toggle input[type="checkbox"]:checked + .toggle-label::after {
  transform: translateX(24px);
}

.cookie-toggle input[type="checkbox"]:disabled + .toggle-label {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Cookie Details */
.cookie-details {
  line-height: 1.6;
}

.cookie-details h4 {
  margin: 0 0 1.5rem 0;
  color: #1f2937;
  font-size: 1.1rem;
}

.cookie-detail-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
}

.cookie-detail-section h5 {
  margin: 0 0 0.5rem 0;
  color: #374151;
  font-size: 1rem;
}

.cookie-detail-section p {
  margin: 0 0 0.5rem 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.cookie-detail-section small {
  color: #9ca3af;
  font-size: 0.8rem;
}

/* Cookie About */
.cookie-about {
  line-height: 1.6;
}

.cookie-about h4 {
  margin: 0 0 1rem 0;
  color: #1f2937;
}

.cookie-about p {
  margin: 0 0 1rem 0;
  color: #4b5563;
}

.cookie-about a {
  color: var(--accent2, #7ed321);
  text-decoration: none;
  font-weight: 500;
}

.cookie-about a:hover {
  text-decoration: underline;
}

/* Modal Footer */
.cookie-modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.cookie-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.cookie-btn-decline {
  background: #f3f4f6;
  color: #374151;
  border-color: #d1d5db;
}

.cookie-btn-decline:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.cookie-btn-selected {
  background: #3b82f6;
  color: white;
}

.cookie-btn-selected:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.cookie-btn-accept {
  background: var(--accent2, #7ed321);
  color: white;
}

.cookie-btn-accept:hover {
  background: #6ab821;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(126, 211, 33, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
  .cookie-modal-content {
    width: 95%;
    max-height: 90vh;
  }
  
  .cookie-modal-header {
    padding: 1rem 1.5rem;
  }
  
  .cookie-modal-tabs {
    flex-direction: column;
  }
  
  .cookie-tab {
    text-align: left;
    padding: 0.75rem 1.5rem;
  }
  
  .cookie-modal-body {
    padding: 1.5rem;
    max-height: 60vh;
  }
  
  .cookie-category {
    padding: 1rem;
  }
  
  .cookie-category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .cookie-modal-footer {
    padding: 1rem 1.5rem;
    flex-direction: column;
  }
  
  .cookie-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .cookie-modal-content {
    width: 98%;
    margin: 1rem;
    max-height: 95vh;
  }
  
  .cookie-modal-header {
    padding: 1rem;
  }
  
  .cookie-modal-body {
    padding: 1rem;
  }
  
  .cookie-category {
    padding: 0.75rem;
  }
  
  .cookie-modal-footer {
    padding: 1rem;
  }
}

/* Scrollbar Styling */
.cookie-modal-body::-webkit-scrollbar {
  width: 6px;
}

.cookie-modal-body::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.cookie-modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.cookie-modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}