/* Hikes Page - Premium Dark Theme Styles */

:root {
    --hike-card-bg: #111111;
    --hike-card-border: rgba(255, 255, 255, 0.1);
    --hike-card-hover-border: rgba(255, 255, 255, 0.3);
    --hike-text-main: #ffffff;
    --hike-text-muted: #94a3b8;
    --hike-accent-primary: #ef4444; /* red-500 */
    --difficulty-easy: #4ade80;
    --difficulty-moderate: #facc15;
    --difficulty-strenuous: #f87171;
    --difficulty-very-strenuous: #ef4444;
}

/* Background for the results section */
.hike-results-wrapper {
    background-color: #050505;
    margin-left: -2rem;
    margin-right: -2rem;
    padding-left: 2rem;
    padding-right: 2rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
    border-radius: 2rem;
}

.hike-card {
    background-color: var(--hike-card-bg);
    border: 1px solid var(--hike-card-border);
    border-radius: 1.5rem;
    padding: 1.75rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.hike-card:hover {
    border-color: var(--hike-card-hover-border);
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

/* Difficulty Badge */
.difficulty-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-width: 1px;
    background-color: transparent;
}

.difficulty-easy { border-color: var(--difficulty-easy) !important; color: var(--difficulty-easy) !important; }
.difficulty-moderate { border-color: var(--difficulty-moderate) !important; color: var(--difficulty-moderate) !important; }
.difficulty-strenuous, .difficulty-difficult { border-color: var(--difficulty-strenuous) !important; color: var(--difficulty-strenuous) !important; }
.difficulty-very-strenuous { border-color: var(--difficulty-very-strenuous) !important; color: var(--difficulty-very-strenuous) !important; }

/* Content Layout */
.hike-card-title {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--hike-text-main);
    margin-bottom: 0.75rem;
    line-height: 1.2;
    padding-right: 5rem; /* Space for the badge */
}

.hike-meta {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1.25rem;
    row-gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--hike-text-muted);
}

.hike-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.hike-meta-item .material-symbols-outlined {
    font-size: 1.1rem;
    opacity: 0.8;
}

.hike-description {
    color: #94a3b8;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
    flex-grow: 1;
}

/* Star Rating */
.hike-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.star-container {
    display: flex;
    gap: 1px;
}

.star-container .material-symbols-outlined {
    font-size: 14px;
    color: #334155; /* slate-700 */
}

.star-container .material-symbols-outlined.active {
    color: #facc15; /* yellow-400 */
    font-variation-settings: 'FILL' 1;
}

.rating-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: #e2e8f0;
}

.rating-count {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

/* Actions Overlay (Hidden until hover) */
.hike-card-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
}

.btn-details {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.6rem;
    border-radius: 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    transition: all 0.2s ease;
}

.btn-details:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-action-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.btn-action-icon:hover {
    background-color: #ef4444;
    color: #ffffff;
}

@media (max-width: 640px) {
    .hike-results-wrapper {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Troop Completed Boot Icon Styles */
.hike-boot-icon {
    width: 24px; /* Boot print looks better at 24px */
    height: 48px; /* Maintain aspect ratio (1:2) roughly */
    flex: 0 0 24px;
    margin-left: auto;
    transition: all 0.3s ease;
    display: block;
    color: #16a34a; /* Forest green */
    fill: currentColor;
}

.hike-boot-icon.shake {
    animation: boot-shake 0.8s cubic-bezier(.36,.07,.19,.97) both;
}

.hike-boot-placeholder {
    margin-left: auto;
}

@keyframes boot-shake {
    10%, 90% { transform: translate3d(-1px, 0, 0) rotate(-2deg); }
    20%, 80% { transform: translate3d(2px, 0, 0) rotate(4deg); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0) rotate(-6deg); }
    40%, 60% { transform: translate3d(4px, 0, 0) rotate(6deg); }
}

.admin-toggle {
    cursor: pointer;
}

.admin-toggle:hover {
    transform: scale(1.1);
}

/* Custom Toggle Switch for Forms */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1; /* slate-300 */
  transition: .4s;
  border-radius: 24px;
}

/* Waypoint Info Markers (Custom Orange 'i' Pin Style) */
img[src*="data:image/svg+xml"] {
    width: 16px !important;
    height: 21px !important;
    margin-left: -8px !important;
    margin-top: -21px !important; /* Bottom point at coordinate */
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
}

img[src*="data:image/svg+xml"]:hover {
    transform: scale(1.25) translateY(-2px);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000 !important;
    cursor: pointer;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
  background-color: #16a34a; /* green-600 */
}

input:focus + .slider {
  box-shadow: 0 0 1px #16a34a;
}

input:checked + .slider:before {
  transform: translateX(26px);
}
