/**
 * IslandBarter Directory — Public Styles
 *
 * Palette:
 *   Deep ocean blue primary:  #1a365d / #2563eb
 *   Warm coral secondary:    #e85d3a / #f97316
 *   Tropical green accent:   #16a34a / #22c55e
 *   Golden yellow pop:       #eab308 / #fbbf24
 *   Neutrals:                #0f172a / #334155 / #64748b / #94a3b8 / #e2e8f0 / #f4f7fa
 *
 * @package IslandBarterDirectory
 */

/* ── Reset ─────────────────────────────────────────────────────── */
.ibd-directory-wrap *,
.ibd-single-wrap * {
    box-sizing: border-box;
}

/* ── Hero ──────────────────────────────────────────────────────── */
.ibd-hero {
    background: linear-gradient(135deg, #1a365d 0%, #2563eb 100%);
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.ibd-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
}

.ibd-hero__title {
    color: #fff;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.ibd-hero__subtitle {
    color: rgba(255,255,255,0.75);
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    margin: 0;
    font-weight: 400;
}

/* ── Filters ───────────────────────────────────────────────────── */
.ibd-filters {
    margin-bottom: 24px;
}

.ibd-filters__row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
}

.ibd-filters__search {
    flex: 1 1 280px;
    position: relative;
}

.ibd-filters__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
}

.ibd-filters__input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    color: #0f172a;
    background: #fff;
    transition: border-color 0.2s;
    outline: none;
}

.ibd-filters__input:focus {
    border-color: #2563eb;
}

.ibd-filters__select-wrap {
    flex: 0 1 200px;
}

.ibd-filters__select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    color: #0f172a;
    background: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M1.41.59L6 5.17 10.59.59 12 2 6 8 0 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.ibd-filters__select:focus {
    border-color: #2563eb;
}

.ibd-filters__btn {
    padding: 12px 28px;
    background: #1a365d;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.ibd-filters__btn:hover {
    background: #2563eb;
}

/* ── Results Meta ──────────────────────────────────────────────── */
.ibd-results-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 4px;
}

.ibd-results-meta__count {
    color: #64748b;
    font-size: 14px;
}

.ibd-results-meta__clear {
    color: #e85d3a;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
}

.ibd-results-meta__clear:hover {
    text-decoration: underline;
}

/* ── Grid ──────────────────────────────────────────────────────── */
.ibd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* ── Card ──────────────────────────────────────────────────────── */
.ibd-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ibd-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.ibd-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ibd-card__image-wrap {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
    overflow: hidden;
}

.ibd-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ibd-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #cbd5e1;
}

.ibd-card__placeholder svg {
    width: 48px;
    height: 48px;
}

.ibd-card__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.ibd-card__badge--verified {
    background: #16a34a;
    color: #fff;
}

.ibd-card__body {
    padding: 16px 20px 20px;
}

.ibd-card__name {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
    line-height: 1.3;
}

.ibd-card__cat {
    display: inline-block;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 6px;
}

.ibd-card__island {
    display: inline-block;
    background: #f0fdf4;
    color: #16a34a;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 6px;
    margin-left: 4px;
}

.ibd-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 13px;
    margin: 4px 0 0;
    line-height: 1.4;
}

.ibd-card__meta svg {
    flex-shrink: 0;
    color: #94a3b8;
}

/* ── Empty State ───────────────────────────────────────────────── */
.ibd-empty {
    text-align: center;
    padding: 64px 20px;
    color: #94a3b8;
}

.ibd-empty__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.ibd-empty__text {
    font-size: 16px;
    margin: 0 0 12px;
}

.ibd-empty__link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

/* ── Pagination ────────────────────────────────────────────────── */
.ibd-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 40px;
}

.ibd-pagination a,
.ibd-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.ibd-pagination a {
    color: #334155;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.ibd-pagination a:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.ibd-pagination .current {
    background: #1a365d;
    color: #fff;
    border: 1px solid #1a365d;
}

/* ── About Section ─────────────────────────────────────────────── */
.ibd-about {
    background: #f8fafc;
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    margin-top: 40px;
}

.ibd-about__title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 32px;
}

.ibd-about__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.ibd-about__card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
}

.ibd-about__emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 12px;
}

.ibd-about__card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
}

.ibd-about__card p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   SINGLE BUSINESS PAGE
   ═══════════════════════════════════════════════════════════════ */

.ibd-single-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px 60px;
}

/* ── Success Notice ────────────────────────────────────────────── */
.ibd-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
}

.ibd-notice--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.ibd-notice--success strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.ibd-notice--success p {
    margin: 0;
    font-size: 14px;
    color: #166534;
}

.ibd-notice--success svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* ── Breadcrumb ────────────────────────────────────────────────── */
.ibd-breadcrumb {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 24px;
}

.ibd-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.ibd-breadcrumb a:hover {
    text-decoration: underline;
}

.ibd-breadcrumb__sep {
    margin: 0 8px;
    color: #cbd5e1;
}

.ibd-breadcrumb__current {
    color: #334155;
    font-weight: 500;
}

/* ── Single Grid ───────────────────────────────────────────────── */
.ibd-single__grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 768px) {
    .ibd-single__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ── Media ─────────────────────────────────────────────────────── */
.ibd-single__media {
    border-radius: 12px;
    overflow: hidden;
}

.ibd-single__image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.ibd-single__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 280px;
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
    border-radius: 12px;
    color: #cbd5e1;
}

.ibd-single__placeholder svg {
    width: 64px;
    height: 64px;
}

/* ── Details ───────────────────────────────────────────────────── */
.ibd-single__header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.ibd-single__name {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.02em;
}

.ibd-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.ibd-badge--verified {
    background: #16a34a;
    color: #fff;
}

.ibd-badge--unclaimed {
    background: #fef3c7;
    color: #92400e;
}

.ibd-single__cat {
    display: inline-block;
    background: #eff6ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.ibd-single__content {
    color: #334155;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.ibd-single__content p {
    margin: 0 0 12px;
}

/* ── Contact Info ──────────────────────────────────────────────── */
.ibd-single__contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 24px;
}

.ibd-single__contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #334155;
}

.ibd-single__contact-row svg {
    flex-shrink: 0;
    color: #64748b;
}

.ibd-single__contact-row a {
    color: #2563eb;
    text-decoration: none;
}

.ibd-single__contact-row a:hover {
    text-decoration: underline;
}

.ibd-single__island {
    background: #f0fdf4;
    color: #16a34a;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: auto;
}

/* ── Claim Section ─────────────────────────────────────────────── */
.ibd-claim-section {
    background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 24px;
}

.ibd-claim-section__title {
    font-size: 18px;
    font-weight: 700;
    color: #92400e;
    margin: 0 0 6px;
}

.ibd-claim-section__desc {
    color: #a16207;
    font-size: 14px;
    margin: 0 0 16px;
}

.ibd-claim-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #e85d3a;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.ibd-claim-btn:hover {
    background: #dc4a26;
}

/* ── Claim Form ────────────────────────────────────────────────── */
.ibd-claim-form {
    margin-top: 16px;
}

.ibd-claim-form__field {
    margin-bottom: 14px;
}

.ibd-claim-form__field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 5px;
}

.ibd-claim-form__field input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #fde68a;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.ibd-claim-form__field input:focus {
    border-color: #e85d3a;
}

.ibd-claim-form__submit {
    width: 100%;
    padding: 12px;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.ibd-claim-form__submit:hover {
    background: #15803d;
}

.ibd-claim-form__submit:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.ibd-claim-form__message {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
}

.ibd-claim-form__message--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.ibd-claim-form__message--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* ── Footer ────────────────────────────────────────────────────── */
.ibd-single__footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.ibd-back-link {
    color: #2563eb;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}

.ibd-back-link:hover {
    text-decoration: underline;
}

/* ── Mobile-First Adjustments ──────────────────────────────────── */
@media (max-width: 640px) {
    .ibd-hero {
        padding: 32px 20px;
    }

    .ibd-filters__select-wrap {
        flex: 1 1 100%;
    }

    .ibd-grid {
        grid-template-columns: 1fr;
    }

    .ibd-about__grid {
        grid-template-columns: 1fr;
    }

    .ibd-single__header {
        flex-direction: column;
        align-items: flex-start;
    }
}
