/* Main Styles for Climbing Journal */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

header h1 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin: 0;
}

.logo {
    height: 40px;
    width: auto;
    display: block;
}

/* Header Left Section - burger + title + nav */
.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
}

/* Header Right Section - language + welcome */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.welcome-text {
    color: #555;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Burger button - hidden on desktop */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 7px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.burger-btn:hover {
    background-color: #f0f0f0;
}

.burger-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background-color: #333;
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

/* Nav menu - modern horizontal menu on desktop */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
}

.nav-menu a {
    color: #555;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-menu a:hover {
    background-color: #6e7073;
    color: #fff;
}

.admin-link {
    color: #e74c3c !important;
    font-weight: 600;
}

.admin-link:hover {
    background-color: #fee !important;
    color: #c0392b !important;
}

/* Language Switcher Dropdown */
.language-switcher {
    position: relative;
    font-size: 0.9rem;
}

.lang-selected {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    transition: background-color 0.2s, border-color 0.2s;
}

.lang-selected:hover {
    background-color: #f5f5f5;
    border-color: #bbb;
}

.flag-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.lang-arrow {
    font-size: 0.7rem;
    color: #7f8c8d;
    transition: transform 0.3s ease;
    margin-left: 2px;
}

.language-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 200;
    min-width: 130px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

.language-switcher.open .lang-dropdown {
    max-height: 200px;
    opacity: 1;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    color: #333;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background-color 0.15s;
}

.lang-option:hover {
    background-color: #f5f5f5;
}

.lang-option.active {
    font-weight: 600;
    color: #2c3e50;
    background-color: #eef6fc;
}

.lang-option:first-child {
    border-radius: 6px 6px 0 0;
}

.lang-option:last-child {
    border-radius: 0 0 6px 6px;
}

/* Login Form Styles */
.login-container {
    max-width: 500px;
    margin: 50px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-form h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-primary {
    background-color: #3498db;
}

.btn-secondary {
    background-color: #7f8c8d;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* Alert Styles */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Main Content Layout */
.main-content {
    display: flex;
    gap: 20px;
}

.full-width {
    display: block;
    width: 100%;
}

.calendar-container {
    flex: 3;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sidebar {
    flex: 1;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Calendar Header - Modern Layout */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.cal-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cal-header-left h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    min-width: 180px;
    text-align: center;
}

.nav-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.nav-arrow:hover {
    background-color: #f0f4f8;
    color: #1a1a2e;
    border-color: #e0e0e0;
}

.nav-arrow i {
    font-size: 1rem;
}

.today-btn {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #3498db;
    text-decoration: none;
    border: 1px solid #3498db;
    border-radius: 20px;
    transition: all 0.2s;
    margin-left: 6px;
}

.today-btn:hover {
    background-color: #3498db;
    color: #fff;
}

.cal-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* View Toggle Buttons */
.view-toggle-buttons {
    display: flex;
    background-color: #f0f4f8;
    border-radius: 8px;
    padding: 3px;
}

.view-toggle-btn {
    padding: 7px 11px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #888;
}

.view-toggle-btn i {
    font-size: 1.1rem;
}

.view-toggle-btn.active {
    background-color: #fff;
    color: #1a1a2e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.view-toggle-btn:hover:not(.active) {
    color: #555;
}

/* Year Picker */
.year-picker {
    padding: 7px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
    min-width: 90px;
}

.year-picker:hover {
    border-color: #bbb;
}

.year-picker:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

/* Grid View Styles */
.grid-view {
    display: none;
    width: 100%;
}

.climbs-grid {
    margin-top: 10px;
}

.climbs-grid th {
    cursor: pointer;
    position: relative;
    user-select: none;
}

.climbs-grid th:hover {
    background-color: #e9e9e9;
}

.climbs-grid th.sort-asc::after {
    content: '\25b2';
    position: absolute;
    right: 8px;
    color: #3498db;
}

.climbs-grid th.sort-desc::after {
    content: '\25bc';
    position: absolute;
    right: 8px;
    color: #3498db;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.climbs-grid .btn {
    margin: 0 3px;
}

/* Activity Legend Styles */
.activity-legend {
    margin-top: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.legend-header:hover {
    background-color: #f0f0f0;
}

.legend-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

.legend-toggle-arrow {
    font-size: 1.2rem;
    color: #7f8c8d;
    transition: transform 0.3s ease;
}

.activity-legend.open .legend-toggle-arrow {
    transform: rotate(180deg);
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 15px;
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.activity-legend.open .legend-items {
    max-height: 600px;
    padding: 0 20px 20px 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
    width: 180px;
    background-color: #f5f5f5;
    text-align: left;
}

.legend-item:hover {
    background-color: #f0f0f0;
}

.legend-label {
    font-size: 0.7rem;
    color: #34495e;
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 5px;
}

.calendar-weekdays div {
    text-align: center;
    font-weight: 600;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    min-height: 100px;
    padding: 5px;
    background-color: #f9f9f9;
    border-radius: 4px;
    position: relative;
}

.calendar-day.empty {
    background-color: #f0f0f0;
}

.calendar-day.today {
    background-color: #e3f2fd;
    border: 2px solid #2196F3;
    box-shadow: 0 0 5px rgba(33, 150, 243, 0.3);
}

.day-number {
    font-weight: 600;
    margin-bottom: 5px;
}

.day-climbs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    align-items: center;
}

/* Sidebar Styles */
.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recent-climb {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.recent-climb:last-child {
    border-bottom: none;
}

.recent-climb-date {
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.recent-climb-date a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
}

.recent-climb-date a:hover {
    text-decoration: underline;
}

.recent-climb-details a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
}

.recent-climb-details a:hover {
    text-decoration: underline;
}

.recent-climb-location {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Peak Input System */
#peaks-container {
    margin-bottom: 10px;
}

.peak-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.peak-inputs {
    display: flex;
    flex: 1;
    gap: 10px;
}

.peak-mountain-input {
    flex: 2;
}

.peak-name-input {
    flex: 2;
}

.peak-altitude-input {
    flex: 1;
}

.remove-peak-btn {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    margin-left: 10px;
    font-size: 16px;
}

.remove-peak-btn:hover {
    color: #c0392b;
}

#add-peak-btn {
    margin-bottom: 15px;
}

/* Date Picker Styles */
.date-picker {
    height: 38px;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: #fff;
    width: 100%;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.date-picker:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.25);
    outline: none;
}

.date-picker:hover {
    border-color: #bbb;
}

.flatpickr-calendar {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-radius: 5px;
}

.flatpickr-day.selected {
    background: #3498db;
    border-color: #3498db;
}

.flatpickr-day.selected:hover {
    background: #2980b9;
    border-color: #2980b9;
}

/* Custom Select Dropdown */
.custom-select-container {
    position: relative;
    width: 100%;
}

.custom-select-button {
    display: flex;
    align-items: center;
    width: 100%;
    height: 38px;
    padding: 8px 12px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    transition: all 0.3s;
    justify-content: flex-start;
}

.custom-select-button:hover {
    border-color: #bbb;
}

.custom-select-button.active {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.25);
}

.custom-select-button .activity-icon {
    margin-right: 10px;
    width: 36px;
    height: 36px;
    vertical-align: middle;
}

.custom-select-button .select-text {
    flex: 1;
}

.custom-select-button:after {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #555;
    margin-left: 10px;
    transition: transform 0.3s;
}

.custom-select-button.active:after {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    overflow-y: auto;
    background-color: #fff;
    border: 0;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.custom-select-dropdown.show {
    max-height: 300px;
    opacity: 1;
    visibility: visible;
    border: 1px solid #ddd;
    border-top: none;
}

.custom-select-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: left;
    justify-content: flex-start;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.custom-select-option:hover {
    background-color: #f5f5f5;
}

.custom-select-option.active {
    background-color: #e9f7fe;
    color: #3498db;
}

.custom-select-option .activity-icon {
    margin-right: 10px;
    width: 36px;
    height: 36px;
    vertical-align: middle;
    flex-shrink: 0;
}

.option-text {
    text-align: left;
    flex-grow: 1;
}

/* Full Width Styles */
.main-content.full-width {
    max-width: 100%;
    padding: 0 20px;
}

.full-width-form {
    max-width: 100%;
    width: 100%;
}

.full-width-form textarea {
    min-height: 300px;
}

.full-width-form .form-group {
    margin-bottom: 25px;
}

/* Form Styles */
.form-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

/* Image Thumbnail Styles */
.image-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
    margin-bottom: 25px;
}

.thumbnail-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.thumbnail-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.thumbnail-preview {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.thumbnail-actions {
    padding: 10px;
    background-color: #f9f9f9;
    text-align: center;
}

.thumbnail-caption {
    padding: 8px 10px;
    font-size: 0.9rem;
    color: #555;
    background-color: #f5f5f5;
    border-top: 1px solid #eee;
}

.form-container h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

textarea.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    min-height: 100px;
    font-family: inherit;
}

select.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: #fff;
}

/* Climb View Styles */
.climb-details {
    background-color: #fff;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    p{
        margin-bottom: unset;
    }
}

.climb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.climb-header h2 {
    color: #2c3e50;
}

.climb-actions {
    display: flex;
    gap: 10px;
}

.climb-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.climb-info-item {
    margin-bottom: 10px;
}

.climb-info-label {
    font-weight: 600;
    color: #7f8c8d;
}

.climb-notes {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Image Gallery Styles */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.gallery-item {
    position: relative;
}

.gallery-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-image:hover {
    transform: scale(1.05);
}

.image-caption {
    margin-top: 5px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid #ddd;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Responsive Styles */

/* Tablet breakpoint */
@media (max-width: 992px) {
    .main-content {
        flex-direction: column;
    }

    .calendar-container {
        flex: none;
        width: 100%;
    }

    .sidebar {
        flex: none;
        width: 100%;
    }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    /* Header */
    header {
        flex-wrap: wrap;
        padding: 15px 0;
        gap: 12px;
    }

    header h1 {
        font-size: 1.2rem;
        order: 2;
        flex: 1;
    }

    .logo {
        height: 32px;
    }

    .header-left {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        width: 100%;
        gap: 12px;
        justify-content: space-between;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .burger-btn {
        display: flex;
        order: 1;
    }

    .header-left .logo {
        order: 2;
        margin-left: auto;
    }

    .welcome-text {
        font-size: 0.85rem;
    }

    .language-switcher {
        font-size: 0.85rem;
    }

    .nav-menu {
        order: 3;
        flex-basis: 100%;
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        background-color: #f9f9f9;
        border-radius: 6px;
        gap: 0;
    }

    .nav-menu.open {
        max-height: 300px;
        padding: 8px 0;
    }

    .nav-menu a {
        display: block;
        padding: 10px 16px;
        font-size: 0.9rem;
        border-bottom: 1px solid #eee;
        border-radius: 0;
    }

    .nav-menu a:last-child {
        border-bottom: none;
    }

    .nav-menu a:hover {
        background-color: #e9ecef;
    }

    /* Main layout */
    .main-content {
        flex-direction: column;
        gap: 15px;
    }

    .calendar-container {
        padding: 12px;
    }

    .sidebar {
        padding: 15px;
    }

    /* Calendar header */
    .calendar-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding-bottom: 12px;
    }

    .cal-header-left {
        justify-content: center;
        gap: 4px;
    }

    .cal-header-left h2 {
        font-size: 1.15rem;
        min-width: auto;
    }

    .nav-arrow {
        width: 32px;
        height: 32px;
    }

    .today-btn {
        padding: 4px 10px;
        font-size: 0.7rem;
        margin-left: 4px;
    }

    .cal-header-right {
        justify-content: center;
        gap: 10px;
    }

    .year-picker {
        font-size: 0.8rem;
        padding: 6px 24px 6px 10px;
        min-width: 80px;
    }

    /* Calendar grid */
    .calendar-weekdays div {
        padding: 6px 2px;
        font-size: 0.7rem;
    }

    .calendar-days {
        gap: 3px;
    }

    .calendar-day {
        min-height: 50px;
        padding: 3px;
    }

    .day-number {
        font-size: 0.8rem;
        margin-bottom: 2px;
    }

    .day-climbs {
        gap: 2px;
    }

    .activity-icon {
        width: 32px;
        height: 32px;
        line-height: 32px;
        font-size: 16px;
        margin-right: 0;
    }

    .activity-icon::before {
        font-size: 16px;
        width: 20px;
        height: 20px;
    }

    /* Activity legend */
    .activity-legend {
        padding: 12px;
    }

    .legend-items {
        gap: 8px;
        justify-content: flex-start;
    }

    .legend-item {
        width: calc(50% - 4px);
        min-width: 140px;
        padding: 6px 8px;
        gap: 8px;
    }

    .legend-label {
        font-size: 0.65rem;
    }

    /* Sidebar */
    .action-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .action-buttons .btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    /* Climb info */
    .climb-info {
        grid-template-columns: 1fr;
    }

    /* Grid view table */
    .grid-view .table {
        font-size: 0.8rem;
    }

    .grid-view .table th,
    .grid-view .table td {
        padding: 6px 8px;
    }

    .grid-view .btn-sm {
        padding: 3px 6px;
        font-size: 0.7rem;
    }

    /* Buttons general */
    .btn {
        font-size: 0.9rem;
    }

    .btn-sm {
        font-size: 0.75rem;
    }

    /* Form styles for mobile */
    .form-container {
        padding: 15px;
    }

    .flex-container {
        flex-direction: column;
        gap: 10px;
    }

    /* Climb details on mobile */
    .climb-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .climb-actions {
        width: 100%;
    }

    .climb-actions .btn {
        flex: 1;
        text-align: center;
    }

    /* Image gallery */
    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .image-thumbnails {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

/* Small phone breakpoint */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.2rem;
    }

    .calendar-container {
        padding: 8px;
    }

    .calendar-day {
        min-height: 40px;
        padding: 2px;
    }

    .day-number {
        font-size: 0.7rem;
    }

    .activity-icon {
        width: 24px;
        height: 24px;
        line-height: 24px;
        margin-right: 0;
    }

    .activity-icon::before {
        font-size: 14px;
        width: 16px;
        height: 16px;
    }

    .calendar-weekdays div {
        padding: 4px 1px;
        font-size: 0.6rem;
    }

    .cal-header-left h2 {
        font-size: 1rem;
    }

    .today-btn {
        padding: 3px 8px;
        font-size: 0.65rem;
    }

    .nav-arrow {
        width: 28px;
        height: 28px;
    }

    .legend-item {
        width: 100%;
    }

    .action-buttons .btn {
        min-width: 100px;
        font-size: 0.8rem;
    }

    .grid-view .table {
        font-size: 0.7rem;
    }

    /* Hide less important columns on very small screens */
    .grid-view .table th[data-column="country"],
    .grid-view .table td[data-column="country"],
    .grid-view .table th[data-column="peaks"],
    .grid-view .table td[data-column="peaks"] {
        display: none;
    }
}

/* Added styles to replace inline styles */

/* Alert with flex layout */
.alert-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Flex container for form fields */
.flex-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

/* Flex item */
.flex-item {
    flex: 1;
}

/* Full width textarea */
.full-width-textarea {
    width: 100%;
}

/* Block label */
.block-label {
    display: block;
}

/* Climb info column layout */
.climb-info-column {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Info item full width */
.info-item-full {
    width: 100%;
    margin-bottom: 10px;
}
.notes-content{
    padding-top: 20px;
}