/* ============================================
   Scotland Packing List - Tool Styles
   ============================================ */

/* ============================================
   Form Structure
   ============================================ */
.pack-form {
    max-width: 900px;
    margin: 0 auto 2rem;
}

.pack-form-section {
    background: var(--saltire-white);
    border: 1px solid rgba(26, 58, 92, 0.08);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.25rem;
}

.pack-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.pack-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--scottish-blue);
    color: var(--saltire-white);
    border-radius: 50%;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.pack-step-label {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--scottish-blue-deep);
    margin: 0;
}

.pack-step-hint {
    font-size: 0.85rem;
    color: var(--stone-grey);
    margin: 0 0 1rem;
    padding-left: 2.75rem;
}

/* ============================================
   Date Fields
   ============================================ */
.pack-dates-row {
    display: flex;
    gap: 1.25rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.pack-date-field {
    flex: 1;
    min-width: 160px;
}

.pack-date-field label {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--scottish-blue-deep);
    margin-bottom: 0.4rem;
}

.pack-date-field input[type="date"] {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid rgba(26, 58, 92, 0.2);
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--peat);
    background: var(--saltire-white);
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.pack-date-field input[type="date"]:focus {
    outline: none;
    border-color: var(--scottish-blue);
    box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.1);
}

.pack-trip-duration {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--scottish-blue);
    padding-bottom: 0.65rem;
    white-space: nowrap;
}

/* ============================================
   Toggle Button Grid (Regions & Activities)
   ============================================ */
.pack-toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.6rem;
}

.pack-activity-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.pack-toggle-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.75rem;
    background: var(--saltire-white);
    border: 1.5px solid rgba(26, 58, 92, 0.12);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: 'DM Sans', sans-serif;
}

.pack-toggle-btn:hover {
    border-color: var(--scottish-blue);
    background: var(--highland-mist);
    transform: translateY(-1px);
}

.pack-toggle-btn.active {
    border-color: var(--scottish-blue);
    background: rgba(26, 58, 92, 0.06);
    box-shadow: 0 0 0 2px var(--scottish-blue);
}

.pack-toggle-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--scottish-blue-deep);
}

.pack-toggle-sub {
    font-size: 0.72rem;
    color: var(--stone-grey);
    margin-top: 2px;
}

/* Activity button with icon */
.pack-activity-btn {
    gap: 0.4rem;
}

.pack-activity-icon {
    color: var(--stone-grey);
    transition: color 0.2s ease;
    line-height: 1;
}

.pack-activity-btn.active .pack-activity-icon {
    color: var(--scottish-blue);
}

.pack-activity-icon svg {
    display: block;
}

/* ============================================
   Generate Button
   ============================================ */
.pack-form-actions {
    text-align: center;
    margin: 1.5rem 0 0;
}

.pack-generate-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: var(--whisky-gold);
    color: var(--saltire-white);
    border: none;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pack-generate-btn:hover {
    background: #c49a3f;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212, 168, 75, 0.3);
}

.pack-generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.pack-generate-btn svg {
    flex-shrink: 0;
}

.pack-form-note {
    font-size: 0.85rem;
    color: #ef4444;
    margin: 0.75rem 0 0;
    min-height: 1.2em;
}

/* ============================================
   Results Section
   ============================================ */
.pack-results {
    max-width: 900px;
    margin: 0 auto 3rem;
}

/* Weather Summary */
.pack-weather-summary {
    background: var(--highland-mist);
    border: 1px solid rgba(26, 58, 92, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.pack-weather-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--stone-grey);
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pack-weather-title svg {
    flex-shrink: 0;
    color: var(--scottish-blue);
}

.pack-weather-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
}

.pack-weather-stat {
    display: flex;
    flex-direction: column;
}

.pack-weather-stat-value {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--scottish-blue-deep);
}

.pack-weather-stat-label {
    font-size: 0.75rem;
    color: var(--stone-grey);
}

.pack-weather-source {
    font-size: 0.75rem;
    color: var(--stone-grey);
    margin-top: 0.75rem;
    font-style: italic;
}

/* Trip summary line */
.pack-trip-summary {
    font-size: 0.9rem;
    color: var(--peat);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.pack-trip-summary strong {
    color: var(--scottish-blue-deep);
}

/* ============================================
   Actions Bar
   ============================================ */
.pack-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.pack-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    background: var(--saltire-white);
    border: 1px solid rgba(26, 58, 92, 0.15);
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--scottish-blue-deep);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pack-action-btn:hover {
    border-color: var(--scottish-blue);
    background: var(--highland-mist);
}

.pack-action-btn svg {
    flex-shrink: 0;
}

/* ============================================
   Packing Categories
   ============================================ */
.pack-category {
    background: var(--saltire-white);
    border: 1px solid rgba(26, 58, 92, 0.08);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.pack-category summary {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
    user-select: none;
}

.pack-category summary::-webkit-details-marker {
    display: none;
}

.pack-category summary:hover {
    background: var(--highland-mist);
}

.pack-category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pack-category-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--scottish-blue-deep);
}

.pack-category-count {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--stone-grey);
    background: var(--highland-mist);
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
}

.pack-category-progress {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    color: var(--stone-grey);
    margin-right: 0.5rem;
}

.pack-category-progress.all-packed {
    color: #22c55e;
    font-weight: 600;
}

.pack-category-arrow {
    color: var(--stone-grey);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.pack-category[open] .pack-category-arrow {
    transform: rotate(180deg);
}

/* Checklist Items */
.pack-items {
    padding: 0 1.5rem 1.25rem;
}

.pack-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(26, 58, 92, 0.05);
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.pack-item:last-child {
    border-bottom: none;
}

.pack-item.checked {
    opacity: 0.5;
}

.pack-item.checked .pack-item-name {
    text-decoration: line-through;
}

.pack-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(26, 58, 92, 0.25);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 1px;
    accent-color: var(--scottish-blue);
}

.pack-item-content {
    flex: 1;
    min-width: 0;
}

.pack-item-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pack-item-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--peat);
    transition: text-decoration 0.2s ease;
}

.pack-item-qty {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--scottish-blue);
    background: rgba(26, 58, 92, 0.06);
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
}

.pack-item-priority {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
}

.pack-priority-essential {
    background: #fef2f2;
    color: #991b1b;
}

.pack-priority-recommended {
    background: #fffbeb;
    color: #92400e;
}

.pack-priority-optional {
    background: var(--highland-mist);
    color: var(--stone-grey);
}

.pack-item-note {
    font-size: 0.78rem;
    color: var(--stone-grey);
    margin-top: 2px;
    line-height: 1.4;
}

/* ============================================
   Modify Trip Button
   ============================================ */
.pack-modify {
    text-align: center;
    margin-top: 1rem;
}

.pack-modify-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1.5px solid var(--scottish-blue);
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--scottish-blue);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pack-modify-btn:hover {
    background: var(--scottish-blue);
    color: var(--saltire-white);
}

.pack-modify-btn svg {
    flex-shrink: 0;
}

/* ============================================
   SEO Content (matches midge-info-section)
   ============================================ */
.pack-info-section {
    max-width: 800px;
    margin: 0 auto 3rem;
    padding: 2rem 0;
}

.pack-info-section h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    color: var(--scottish-blue-deep);
    margin-bottom: 1rem;
}

.pack-info-section h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.2rem;
    color: var(--scottish-blue-deep);
    margin: 1.5rem 0 0.75rem;
}

.pack-info-section p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--peat);
    margin-bottom: 1rem;
}

.pack-info-section ul {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

.pack-info-section li {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--peat);
    margin-bottom: 0.5rem;
}

/* ============================================
   FAQ (matches midge-faq)
   ============================================ */
.pack-faq {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.pack-faq h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    color: var(--scottish-blue-deep);
    margin-bottom: 1.25rem;
    text-align: center;
}

.pack-faq-item {
    border: 1px solid rgba(26, 58, 92, 0.08);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.pack-faq-item summary {
    padding: 1rem 1.25rem;
    font-weight: 500;
    color: var(--scottish-blue-deep);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.pack-faq-item summary::-webkit-details-marker {
    display: none;
}

.pack-faq-item summary::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--stone-grey);
    flex-shrink: 0;
    margin-left: 1rem;
    transition: transform 0.2s ease;
}

.pack-faq-item[open] summary::after {
    content: '\2212';
}

.pack-faq-item summary:hover {
    background: var(--highland-mist);
}

.pack-faq-item p {
    padding: 0 1.25rem 1rem;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--peat);
    margin: 0;
}

/* ============================================
   Email Modal
   ============================================ */
.pack-email-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.pack-email-overlay.active {
    display: flex;
}

.pack-email-modal {
    background: var(--saltire-white);
    border-radius: 16px;
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: packModalSlideUp 0.25s ease;
}

@keyframes packModalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pack-email-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--stone-grey);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s ease;
}

.pack-email-close:hover {
    color: var(--scottish-blue-deep);
}

.pack-email-icon {
    text-align: center;
    color: var(--scottish-blue);
    margin-bottom: 0.75rem;
}

.pack-email-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.4rem;
    color: var(--scottish-blue-deep);
    text-align: center;
    margin: 0 0 0.4rem;
}

.pack-email-desc {
    font-size: 0.85rem;
    color: var(--stone-grey);
    text-align: center;
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.pack-email-field {
    margin-bottom: 0.5rem;
}

.pack-email-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid rgba(26, 58, 92, 0.2);
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--peat);
    background: var(--saltire-white);
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.pack-email-input:focus {
    outline: none;
    border-color: var(--scottish-blue);
    box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.1);
}

.pack-email-error {
    font-size: 0.8rem;
    color: #ef4444;
    margin: 0 0 0.75rem;
    min-height: 1.1em;
    text-align: center;
}

.pack-email-send {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.8rem 1.5rem;
    background: var(--whisky-gold);
    color: var(--saltire-white);
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pack-email-send:hover {
    background: #c49a3f;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212, 168, 75, 0.3);
}

.pack-email-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pack-email-send svg {
    flex-shrink: 0;
}

.pack-email-privacy {
    font-size: 0.72rem;
    color: var(--stone-grey);
    text-align: center;
    margin: 0.75rem 0 0;
    font-style: italic;
}

.pack-email-success {
    text-align: center;
    padding: 1rem 0;
}

.pack-email-success svg {
    color: #22c55e;
    margin-bottom: 0.5rem;
}

.pack-email-success p {
    font-size: 0.9rem;
    color: var(--peat);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .nav, .nav-homepage, .mobile-menu, .mobile-menu-overlay,
    .page-hero, .pack-form, .pack-actions, .pack-modify,
    .pack-info-section, .pack-faq, .page-cta,
    .footer, .footer-bottom,
    .pack-weather-source, .pack-email-overlay,
    [class*="mediavine"], [id*="mediavine"] {
        display: none !important;
    }

    .pack-results {
        display: block !important;
        max-width: 100%;
        margin: 0;
    }

    .pack-weather-summary {
        border: 1px solid #ccc;
        background: #f9f9f9 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .pack-category {
        break-inside: avoid;
        border: 1px solid #ddd;
        margin-bottom: 0.5rem;
    }

    .pack-category[open] {
        break-inside: auto;
    }

    .pack-item {
        break-inside: avoid;
    }

    .pack-checkbox {
        -webkit-appearance: none;
        appearance: none;
        width: 14px;
        height: 14px;
        border: 1.5px solid #333;
        border-radius: 2px;
    }

    .pack-item.checked .pack-checkbox::after {
        content: '\2713';
        display: block;
        font-size: 10px;
        text-align: center;
        line-height: 12px;
    }

    body::before {
        content: 'LiveBreatheScotland.com \2014 Your Scotland Packing List';
        display: block;
        font-size: 1.1rem;
        font-weight: 600;
        padding: 1rem 0;
        border-bottom: 2px solid #1a3a5c;
        margin-bottom: 1.5rem;
    }
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 640px) {
    .pack-form-section {
        padding: 1.25rem;
    }

    .pack-step-label {
        font-size: 1.15rem;
    }

    .pack-step-hint {
        padding-left: 0;
    }

    .pack-dates-row {
        flex-direction: column;
        gap: 0.75rem;
    }

    .pack-date-field {
        min-width: 100%;
    }

    .pack-toggle-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .pack-toggle-btn {
        padding: 0.75rem 0.5rem;
    }

    .pack-toggle-name {
        font-size: 0.78rem;
    }

    .pack-toggle-sub {
        font-size: 0.65rem;
    }

    .pack-generate-btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }

    .pack-weather-grid {
        gap: 0.75rem 1.5rem;
    }

    .pack-actions {
        gap: 0.4rem;
    }

    .pack-action-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }

    .pack-items {
        padding: 0 1rem 1rem;
    }

    .pack-category summary {
        padding: 1rem 1.25rem;
    }

    .pack-email-modal {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }

    .pack-email-title {
        font-size: 1.2rem;
    }
}
