/**
 * Abbotts Events - Custom Styles
 * Complementary styles for Tailwind CSS
 */

/* ============================================
   Base Styles & Resets
   ============================================ */

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid hsl(25, 40%, 45%);
    outline-offset: 2px;
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================
   Section Padding Utilities
   ============================================ */

.section-padding {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

@media (min-width: 1024px) {
    .section-padding {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }
}

/* ============================================
   Container Utilities
   ============================================ */

.container-narrow {
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.container-wide {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container-narrow,
    .container-wide {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-narrow,
    .container-wide {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* ============================================
   Hover Effects
   ============================================ */

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Border & Glass Effects
   ============================================ */

.elegant-border {
    border: 1px solid hsl(30, 10%, 90%);
    transition: border-color 0.3s ease;
}

.elegant-border:hover {
    border-color: hsl(25, 40%, 45%, 0.3);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-fade-up {
    animation: fadeUp 0.6s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.5s ease-out forwards;
}

/* Animation delays */
.animation-delay-100 {
    animation-delay: 100ms;
}

.animation-delay-200 {
    animation-delay: 200ms;
}

.animation-delay-300 {
    animation-delay: 300ms;
}

.animation-delay-400 {
    animation-delay: 400ms;
}

.animation-delay-500 {
    animation-delay: 500ms;
}

/* ============================================
   Accordion Styles
   ============================================ */

[data-accordion-content] {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

[data-accordion-icon] {
    transition: transform 0.3s ease;
}

[data-accordion-item].open [data-accordion-icon] {
    transform: rotate(180deg);
}

/* ============================================
   Gallery
   ============================================ */

.gallery-hidden {
    display: none !important;
}

.gallery-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#gallery-lightbox {
    transition: opacity 0.3s ease;
}

#lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

/* ============================================
   Cookie Banner
   ============================================ */

#cookie-banner {
    transition: transform 0.4s ease, opacity 0.4s ease;
}

/* ============================================
   Mobile Menu
   ============================================ */

#mobile-menu {
    transition: transform 0.3s ease;
}

#mobile-menu-overlay {
    transition: opacity 0.3s ease;
}

/* ============================================
   Form Styles
   ============================================ */

input:focus,
textarea:focus,
select:focus {
    border-color: hsl(25, 40%, 45%);
    box-shadow: 0 0 0 3px hsla(25, 40%, 45%, 0.1);
}

/* Custom checkbox/radio styling */
input[type="checkbox"],
input[type="radio"] {
    accent-color: hsl(25, 40%, 45%);
}

/* ============================================
   Typography
   ============================================ */

.prose {
    color: hsl(30, 10%, 40%);
    line-height: 1.75;
}

.prose h2 {
    color: hsl(30, 10%, 15%);
    margin-top: 2em;
    margin-bottom: 1em;
}

.prose h3 {
    color: hsl(30, 10%, 15%);
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

.prose a {
    color: hsl(25, 40%, 45%);
    text-decoration: underline;
}

.prose a:hover {
    color: hsl(25, 40%, 35%);
}

.prose ul,
.prose ol {
    margin-top: 1em;
    margin-bottom: 1em;
    padding-left: 1.5em;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* ============================================
   Scrollbar Styling
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: hsl(30, 10%, 95%);
}

::-webkit-scrollbar-thumb {
    background: hsl(30, 10%, 70%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(30, 10%, 60%);
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .no-print,
    #cookie-banner,
    #mobile-menu,
    #mobile-menu-overlay {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* ============================================
   Selection Styling
   ============================================ */

::selection {
    background-color: hsl(25, 40%, 45%);
    color: white;
}

::-moz-selection {
    background-color: hsl(25, 40%, 45%);
    color: white;
}

/* ============================================
   Image Loading Placeholder
   ============================================ */

.img-loading {
    background: linear-gradient(
        90deg,
        hsl(30, 10%, 92%) 0%,
        hsl(30, 10%, 96%) 50%,
        hsl(30, 10%, 92%) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   Responsive Images
   ============================================ */

.responsive-img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   Skip Link (Accessibility)
   ============================================ */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: hsl(30, 10%, 18%);
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* ---------------------------------------------------------------------------
   Utilities not present in the generated assets/css/tailwind.css.
   That file is machine output - do not hand-edit it. When you add a Tailwind
   class to a template that isn't in it, either regenerate it or add the rule
   here. See CLAUDE.md > Styling.
   --------------------------------------------------------------------------- */
.align-middle  { vertical-align: middle; }
.ml-3          { margin-left: 0.75rem; }
.px-2\.5       { padding-left: 0.625rem; padding-right: 0.625rem; }
.leading-snug  { line-height: 1.375; }

/* Spacing and layout used by the booking form and bookings admin */
.mt-6            { margin-top: 1.5rem; }
.pt-12           { padding-top: 3rem; }
@media (min-width: 640px) {
    .sm\:items-center { align-items: center; }
}

/* Status colours (Tailwind red/green palette). The contact form's flash
   box uses these too; they were never in the generated file. */
.bg-red-100      { background-color: #fee2e2; }
.border-red-200  { border-color: #fecaca; }
.border-red-500  { border-color: #ef4444; }
.text-red-700    { color: #b91c1c; }
.text-red-800    { color: #991b1b; }
.bg-green-100    { background-color: #dcfce7; }
.border-green-200 { border-color: #bbf7d0; }
.text-green-800  { color: #166534; }

/* Native checkbox tint matches the accent colour */
.accent-accent   { accent-color: hsl(25 40% 45%); }

/* ============================================
   Booking form honeypot
   Off-screen rather than display:none, because some bots skip hidden inputs.
   ============================================ */
.hp-field {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ============================================
   Bookings admin
   ============================================ */
.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid hsl(35 15% 88%);
    border-radius: 0.125rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
    border-bottom: 1px solid hsl(35 15% 88%);
}

.admin-table th {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: hsl(30 8% 45%);
    background-color: hsl(35 15% 92%);
}

.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background-color: hsl(35 15% 96%); }

.admin-dl {
    display: grid;
    gap: 1.25rem;
}

.admin-dl dt {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: hsl(30 8% 45%);
    margin-bottom: 0.25rem;
}

.admin-dl dd {
    margin: 0;
    color: hsl(30 10% 15%);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

@media (min-width: 640px) {
    .admin-dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-dl .admin-dl-full { grid-column: 1 / -1; }
}

/* ============================================
   Booking page hero
   Logo beside the heading at every size. On phones the logo is small and
   the intro paragraphs drop underneath at full width; from 768px the logo
   spans both rows so the whole text block sits beside it.
   ============================================ */
.booking-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 1.25rem;
    row-gap: 1.5rem;
    align-items: center;
}

.booking-hero__logo {
    grid-column: 1;
    grid-row: 1;
    width: 5.5rem;
    height: auto;
    flex-shrink: 0;
}

.booking-hero__heading {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

.booking-hero__body {
    grid-column: 1 / -1;
    grid-row: 2;
}

@media (min-width: 640px) {
    .booking-hero { column-gap: 2rem; }
    .booking-hero__logo { width: 8rem; }
}

@media (min-width: 768px) {
    .booking-hero { column-gap: 3rem; row-gap: 1.75rem; }
    .booking-hero__logo { width: 11rem; grid-row: 1 / span 2; }
    .booking-hero__body { grid-column: 2; grid-row: 2; }
}

@media (min-width: 1024px) {
    .booking-hero { column-gap: 4rem; }
    .booking-hero__logo { width: 14rem; }
}

/* Booking hero spacing and heading size steps */
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
@media (min-width: 640px) {
    .sm\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
}
