/**
 * Cookie Policy Popup Styles
 * สไตล์สำหรับ popup นโยบายคุกกี้ การตั้งค่าคุกกี้ และนโยบายความเป็นส่วนตัว
 */

.cookie-policy-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease-in-out;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.cookie-policy-modal {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  animation: slideIn 0.3s ease-out;
  position: relative;
  transform: translateY(-50px) scale(0.9);
  transition: transform 0.3s ease;
}

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

.cookie-policy-header {
  background: linear-gradient(135deg, #1d85b6 0%, #1d85b6 100%);
  color: white;
  padding: 25px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 10px 10px 0 0;
}

.cookie-policy-title h4 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.cookie-policy-subtitle {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 5px;
  display: block;
}

.cookie-policy-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cookie-policy-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.cookie-policy-content {
  padding: 30px;
  max-height: 60vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ddd #f5f5f5;
}

.cookie-policy-content::-webkit-scrollbar {
  width: 8px;
}

.cookie-policy-content::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 4px;
}

.cookie-policy-content::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}

.cookie-policy-update {
  background: #e3f2fd;
  color: #1976d2;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 25px;
  font-weight: 500;
}

.cookie-policy-section {
  margin-bottom: 30px;
}

.cookie-policy-section h5 {
  color: #333;
  font-weight: 600;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.cookie-policy-section h5 i {
  color: #667eea;
  width: 20px;
}

.cookie-policy-intro {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid #1d85b6;
  line-height: 1.6;
}

.cookie-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.cookie-type-item {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cookie-type-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.cookie-type-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.cookie-type-icon.necessary { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }
.cookie-type-icon.performance { background: linear-gradient(135deg, #4ecdc4, #44a08d); }
.cookie-type-icon.functionality { background: linear-gradient(135deg, #45b7d1, #96c93d); }
.cookie-type-icon.advertising { background: linear-gradient(135deg, #f093fb, #f5576c); }

.cookie-type-content h6 {
  margin: 0 0 8px 0;
  color: #333;
  font-weight: 600;
}

.cookie-type-content p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cookie-purpose-list {
  list-style: none;
  padding: 0;
}

.cookie-purpose-list li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
}

.cookie-purpose-list li:last-child {
  border-bottom: none;
}

.cookie-purpose-list li i {
  color: #4caf50;
  width: 20px;
}

/* สไตล์สำหรับข้อมูลประเภทต่างๆ (Privacy Policy) */
.data-collection-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.data-type-item {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 20px;
  border-left: 4px solid #1d85b6;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.data-type-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.data-type-item h6 {
  color: #333;
  font-weight: 600;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.data-type-item h6 i {
  color: #1d85b6;
  width: 20px;
}

.data-type-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.data-type-item ul li {
  padding: 5px 0;
  color: #666;
  position: relative;
  padding-left: 15px;
}

.data-type-item ul li:before {
  content: "•";
  color: #1d85b6;
  position: absolute;
  left: 0;
}

/* สไตล์สำหรับสิทธิ์ PDPA */
.rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.right-item {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.right-item:hover {
  border-color: #1d85b6;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.right-item i {
  font-size: 2rem;
  color: #1d85b6;
  margin-bottom: 15px;
}

.right-item h6 {
  color: #333;
  font-weight: 600;
  margin-bottom: 10px;
}

.right-item p {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
}

/* สไตล์สำหรับ form switches */
.form-check.form-switch {
  padding-left: 0;
}

.form-check-input {
  width: 3rem;
  height: 1.5rem;
  margin-top: 0;
}

.form-check-input:checked {
  background-color: #1d85b6;
  border-color: #1d85b6;
}

.form-check-label {
  font-weight: 500;
  color: #333;
}

/* สไตล์สำหรับ alert */
.alert {
  border-radius: 10px;
  border: none;
  padding: 15px 20px;
}

.alert-info {
  background: #e3f2fd;
  color: #1976d2;
  border-left: 4px solid #1976d2;
}

.alert-success {
  background: #e8f5e8;
  color: #2e7d32;
  border-left: 4px solid #2e7d32;
}

.alert-danger {
  background: #ffebee;
  color: #c62828;
  border-left: 4px solid #c62828;
}

.contact-info {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid #1d85b6;
}

.company-info h6 {
  color: #333;
  margin: 15px 0 10px 0;
  font-weight: 600;
}

.company-info p {
  margin: 8px 0;
  color: #666;
  display: flex;
  align-items: center;
}

.company-info p i {
  color: #1d85b6;
  width: 20px;
}

.cookie-policy-footer {
  background: #f8f9fa;
  padding: 20px 30px;
  text-align: center;
  border-top: 1px solid #eee;
}

.cookie-policy-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.cookie-policy-actions .btn {
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 120px;
}

.cookie-policy-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, #1d85b6, #1d85b6);
  border: none;
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #167a9e, #167a9e);
  color: white;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from {
    transform: translateY(-50px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .cookie-policy-overlay {
    padding: 10px;
  }
  
  .cookie-policy-modal {
    max-width: 100%;
    margin: 10px;
  }
  
  .cookie-policy-header {
    padding: 20px;
  }
  
  .cookie-policy-title h4 {
    font-size: 1.3rem;
  }
  
  .cookie-policy-content {
    padding: 20px;
  }
  
  .cookie-types {
    grid-template-columns: 1fr;
  }
  
  .data-collection-types {
    grid-template-columns: 1fr;
  }
  
  .rights-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  
  .cookie-policy-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .cookie-policy-actions .btn {
    width: 100%;
    max-width: 200px;
  }
}

/* Accessibility */
.cookie-policy-overlay:focus {
  outline: none;
}

.cookie-policy-close:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .cookie-policy-overlay {
    position: static;
    background: white;
    backdrop-filter: none;
  }
  
  .cookie-policy-modal {
    box-shadow: none;
    max-height: none;
  }
} 