/* cooperation-page.css — Cooperation listing page styles */

/* ── COUNTRY TABS ──────────────────────── */
.tab-flag {
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.country-tabs-wrap {
  background: white;
  border-bottom: 2px solid var(--gray-mid);
  position: sticky;
  top: 70px;
  z-index: 90;
  box-shadow: 0 2px 8px rgba(27,58,92,0.06);
}
.country-tabs {
  display: flex;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 5%;
}
.ctab {
  flex: 1;
  padding: 16px 20px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #999;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color .2s, border-color .2s;
  user-select: none;
  font-family: 'Sarabun', sans-serif;
}
.ctab:hover { color: var(--navy); }
.ctab.active-all {
  color: var(--navy);
  border-bottom-color: var(--navy);
}
.ctab.active-thai {
  color: var(--navy);
  border-bottom-color: var(--navy);
}
.ctab.active-oman {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

/* ── TOOLBAR ──────────────────────────── */
.toolbar-wrap {
  background: var(--gray-light);
  border-bottom: 1px solid var(--gray-mid);
  padding: 14px 0;
}
.toolbar {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 5%;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar-search-wrap {
  position: relative;
  flex: 2;
  min-width: 160px;
}
.toolbar-search-wrap svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  stroke: #aaa; pointer-events: none;
}
.toolbar-search {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 2px solid var(--gray-mid);
  border-radius: 10px;
  font-size: 0.875rem;
  font-family: 'Sarabun', sans-serif;
  color: var(--navy);
  background: white;
  transition: border-color .2s, box-shadow .2s;
}
.toolbar-search:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(240,130,40,0.1);
}
.toolbar-search::placeholder { color: #bbb; }

.filter-select {
  flex: 1;
  min-width: 120px;
  padding: 12px 32px 8px 12px;
  line-height: 1.4;
  border: 2px solid var(--gray-mid);
  border-radius: 10px;
  font-size: 0.875rem;
  font-family: 'Sarabun', sans-serif;
  color: var(--text-mid);
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  cursor: pointer;
  transition: border-color .2s;
}
.filter-select:focus {
  outline: none;
  border-color: var(--orange);
}

.toolbar-spacer { flex: 1; }

.view-toggle {
  display: flex;
  gap: 4px;
  background: white;
  border: 2px solid var(--gray-mid);
  border-radius: 10px;
  padding: 4px;
}
.vbtn {
  width: 32px; height: 32px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: background .15s;
}
.vbtn svg { width: 16px; height: 16px; stroke: #aaa; }
.vbtn.active { background: var(--navy); }
.vbtn.active svg { stroke: white; }

/* ── CONTENT AREA ──────────────────────── */
.coop-content {
  max-width: 1480px;
  margin: 0 auto;
  padding: 32px 5% 60px;
}
.result-count {
  font-size: 0.82rem;
  color: #999;
  margin-bottom: 20px;
  font-family: 'Inter', sans-serif;
}

/* ── LIST VIEW ─────────────────────────── */
.coop-list { display: flex; flex-direction: column; gap: 12px; }

.coop-list-item {
  background: white;
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 2px 10px rgba(27,58,92,0.05);
  cursor: pointer;
  text-decoration: none;
  color: var(--text-dark);
  transition: box-shadow .2s, border-color .2s;
  border: 2px solid transparent;
  border-left: 4px solid transparent;
}
.coop-list-item:hover {
  box-shadow: 0 6px 20px rgba(27,58,92,0.1);
  border-left-color: var(--orange);
}

.list-logo {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: var(--gray-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  overflow: hidden;
}
.list-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 6px;
}

.list-info { flex: 1; min-width: 0; }
.list-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-meta {
  font-size: 0.78rem;
  color: #999;
  margin-bottom: 6px;
  font-family: 'Inter', sans-serif;
}
.list-desc {
  font-size: 0.875rem;
  color: var(--text-mid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-arrow {
  font-size: 1.25rem;
  color: var(--orange);
  flex-shrink: 0;
  transition: transform .2s;
}
.coop-list-item:hover .list-arrow { transform: translateX(4px); }

/* ── GRID VIEW ─────────────────────────── */
.coop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.coop-grid-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(27,58,92,0.07);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform .2s, box-shadow .2s;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
}
.coop-grid-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(27,58,92,0.13);
  border-color: var(--orange);
}

.grid-logo-area {
  height: 90px;
  background: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  border-bottom: 1px solid var(--gray-mid);
}
.grid-logo-area img {
  max-height: 64px;
  max-width: 80%;
  object-fit: contain;
}

.grid-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.grid-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}
.grid-card-type {
  font-size: 0.78rem;
  color: #999;
  font-family: 'Inter', sans-serif;
}
.grid-card-link {
  margin-top: auto;
  padding-top: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--orange);
}

/* ── NO RESULTS ────────────────────────── */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #bbb;
  display: none;
}
.no-results svg { width: 48px; height: 48px; stroke: #ddd; margin-bottom: 14px; }
.no-results p { font-size: 0.95rem; }

/* ── LOAD MORE ─────────────────────────── */
.load-more-wrap {
  text-align: center;
  margin-top: 32px;
}
.load-more-btn {
  background: white;
  border: 2px solid var(--navy);
  color: var(--navy);
  padding: 13px 36px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Sarabun', sans-serif;
  cursor: pointer;
  transition: all .2s;
}
.load-more-btn:hover {
  background: var(--navy);
  color: white;
  transform: translateY(-1px);
}
.load-more-btn:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}

/* ── RESPONSIVE ────────────────────────── */
@media (min-width: 1280px) {
  .coop-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  .coop-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .ctab { font-size: 0.85rem; padding: 14px 10px; }
  .toolbar { gap: 8px; }
  .toolbar-search-wrap { max-width: 100%; }
  .filter-select { font-size: 0.8rem; padding: 8px 28px 8px 10px; }
  .coop-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .list-desc { display: none; }
  .list-logo { width: 44px; height: 44px; font-size: 20px; }
}

@media (max-width: 420px) {
  .coop-grid { grid-template-columns: 1fr; }
  .ctab { font-size: 0.72rem; padding: 10px 6px; line-height: 1.3; }
  .tab-flag { width: 16px; height: 11px; margin-right: 3px; }
}
