/* ALU Color Table - Responsive Frontend Styles */

* {
  box-sizing: border-box;
}

/* Brand color variables (override these in your theme if needed) */
:root {
  --alu-primary: #f90505;
  --alu-primary-dark: #0604d8;
}

.alu-color-wrapper {
  margin: 30px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  max-width: 100%;
  overflow: hidden;
}

.alu-brand-title {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 25px 0;
  color: #333;
}

.alu-color-container {
  display: flex;
  gap: 30px;
}

/* Color Grid - 6 columns */
.alu-color-grid-wrapper {
  flex: 1;
  min-width: 0;
}

.alu-color-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
}

/* Grid Item wrapper to place caption under color box */
.alu-color-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Inline code caption below color tile */
.alu-color-code-inline {
  text-align: center;
  font-size: 12px;
  color: #333;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 4px 8px;
  line-height: 1.2;
}

.alu-color-box {
  aspect-ratio: 1;
  border-radius: 8px;
  cursor: pointer;
  border: 3px solid #ddd;
  transition: all 0.3s ease;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.alu-color-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
}

.alu-color-box:hover {
  border-color: #666;
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alu-color-box:hover .alu-color-overlay {
  background: rgba(0, 0, 0, 0.1);
}

.alu-color-box.active {
  border-color: #0068FF;
  box-shadow: 0 0 0 3px rgba(0, 104, 255, 0.25);
}

/* Color Info - Details */
.alu-color-info-wrapper {
  flex: 0 0 320px;
  max-width: 320px;
  background: #f9f9f9;
  padding: 25px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.alu-color-preview {
  width: 100%;
  height: 220px;
  border-radius: 6px;
  margin-bottom: 20px;
  background-size: cover;
  background-position: center;
  border: 1px solid #ddd;
}

.alu-color-details {
  line-height: 1.6;
}

.alu-color-name {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: #333;
}

.alu-color-code {
  font-size: 13px;
  margin: 0 0 12px 0;
  color: #666;
  font-family: "Courier New", monospace;
  background: #fff;
  padding: 8px 10px;
  border-radius: 4px;
  border-left: 3px solid #0073aa;
}

.alu-color-code strong {
  font-weight: 600;
}

.alu-color-description {
  font-size: 14px;
  color: #555;
  margin: 0;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.alu-color-description table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 16px;
  background: #fff;
  color: #000;
}

.alu-color-description table th,
.alu-color-description table td {
  padding: 8px 10px;
  border: 1px solid #ddd;
  text-align: center;
}

.alu-color-description table td {
  color: #1c1818;
}

.alu-color-description table th {
  background-color: #f5f5f5;
  font-weight: 600;
  color: #333;
}

/* Contact Info Section */
.contact-divider {
  height: 2px;
  background: linear-gradient(to right, #0073aa, #00a0d2);
  margin: 25px 0 20px 0;
  border-radius: 2px;
}

.contact-title {
  font-size: 16px;
  font-weight: 700;
  color: #0073aa;
  margin: 0 0 15px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Accordion Styles */
.contact-accordion {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.accordion-item {
  border-bottom: 1px solid #e9ecef;
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.accordion-header:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.accordion-item.active .accordion-header {
  background: linear-gradient(135deg, var(--alu-primary) 0%, var(--alu-primary-dark) 100%);
  color: #fff;
}

.accordion-icon {
  font-size: 12px;
  margin-right: 12px;
  transition: transform 0.3s ease;
  color: #0073aa;
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
  color: #fff;
}

.accordion-title {
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.accordion-item.active .accordion-title {
  color: #fff;
}

.accordion-content {
  padding: 16px 18px;
  background: #fafafa;
  border-left: 1px solid #d10528;
  border-right: 1px solid #d10528;
  line-height: 1.8;
  font-size: 14px;
  color: #333;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

.accordion-content p {
  margin: 8px 0;
}

.accordion-content strong {
  color: #0073aa;
  font-weight: 600;
}

.contact-content {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 18px 20px;
  border-radius: 8px;
  border-left: 4px solid #0073aa;
  line-height: 1.8;
  font-size: 14px;
  color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.contact-content p {
  margin: 8px 0;
}

.contact-content strong {
  color: #0073aa;
  font-weight: 600;
}

.phone-links-wrapper {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.phone-link,
.zalo-link {
  position: relative;
  flex: 1;
  text-decoration: none;
  padding: 20px 12px 12px 12px;
  background: #fff;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  min-width: 0;
}

.phone-link {
  border: 2px solid #dc3545;
  color: #dc3545;
}

.zalo-link {
  border: 2px solid #0068FF;
  color: #0068FF;
}

.link-label {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 2px 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
}

.phone-link .link-label {
  color: #dc3545;
}

.zalo-link .link-label {
  color: #0068FF;
}

.link-content {
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
}

.phone-link:hover {
  background: #dc3545;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.phone-link:hover .link-label {
  color: #dc3545;
  background: #fff;
}

.phone-link:hover .link-content {
  color: #fff;
}

.zalo-link:hover {
  background: #0068FF;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 104, 255, 0.3);
}

.zalo-link:hover .link-label {
  color: #0068FF;
  background: #fff;
}

.zalo-link:hover .link-content {
  color: #fff;
}

.zalo-link:hover svg rect {
  fill: #fff;
}

.zalo-link:hover svg path {
  fill: #0068FF;
}

.zalo-link svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ===========================
   RESPONSIVE - Tablet (768px)
   =========================== */
@media (max-width: 1024px) {
  .alu-color-container {
    gap: 20px;
  }

  .alu-color-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
  }

  .alu-color-info-wrapper {
    flex: 0 0 280px;
    padding: 20px;
  }

  .alu-color-preview {
    height: 180px;
  }

  .alu-brand-title {
    font-size: 24px;
  }
}

/* ===========================
   RESPONSIVE - Mobile (600px)
   =========================== */
@media (max-width: 768px) {
  .alu-color-container {
    flex-direction: column;
    gap: 25px;
  }

  .alu-color-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .alu-color-info-wrapper {
    flex: 1;
    max-width: 100%;
    width: 100%;
    padding: 20px;
  }

  .alu-color-preview {
    height: 200px;
  }

  .alu-brand-title {
    font-size: 22px;
  }
}

/* ===========================
   RESPONSIVE - Small Mobile (480px)
   =========================== */
@media (max-width: 600px) {
  .alu-color-wrapper {
    margin: 20px 0;
  }

  .alu-brand-title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .alu-color-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .alu-color-info-wrapper {
    padding: 18px;
    max-width: 100%;
    width: 100%;
  }

  .alu-color-preview {
    height: 160px;
  }

  .alu-color-name {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .alu-color-code {
    font-size: 12px;
    padding: 6px 8px;
    margin-bottom: 10px;
  }

  .alu-color-description {
    font-size: 13px;
  }
}

/* ===========================
   RESPONSIVE - Extra Small (360px)
   =========================== */
@media (max-width: 480px) {
  .alu-color-wrapper {
    margin: 15px 0;
  }

  .alu-brand-title {
    font-size: 18px;
    margin-bottom: 15px;
  }

  .alu-color-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .alu-color-box {
    border-width: 2px;
  }

  .alu-color-info-wrapper {
    padding: 15px;
    max-width: 100%;
    width: 100%;
  }

  .alu-color-preview {
    height: 140px;
  }

  .alu-color-name {
    font-size: 16px;
  }
}

