/* 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;
}

.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: 2rem;
}

.user-info {
    font-size: 0.9rem;
}

.user-info a {
    color: #3498db;
    text-decoration: none;
    margin-left: 5px;
}

.user-info a:hover {
    text-decoration: underline;
}

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

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

/* Header Right Section */
.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Language Switcher Styles */
.language-switcher {
    font-size: 0.9rem;
    text-align: right;
}

.language-switcher span {
    margin-right: 5px;
    color: #555;
}

.lang-link {
    color: #3498db;
    text-decoration: none;
    border-radius: 3px;
}

.lang-link:hover {
    text-decoration: underline;
}

.lang-link.active {
    font-weight: bold;
    color: #2c3e50;
    background-color: #f0f0f0;
}

/* 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);
}

/* View Toggle Styles */
.view-toggle {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.view-toggle-buttons {
    display: flex;
    margin-right: 35px;
}

.view-toggle-btn {
    padding: 8px 12px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.view-toggle-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.view-toggle-btn:last-child {
    border-radius: 0 4px 4px 0;
}

.view-toggle-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

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

.year-picker-container {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.year-picker-container label {
    margin-right: 8px;
    font-weight: 500;
}

.year-picker {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    min-width: 100px;
}

/* 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;
}

/* Calendar Styles */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

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

.activity-legend h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.2rem;
    text-align: center;
    font-weight: 600;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 15px;
}

.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;
}

/* 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-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;
    display: inline-block;
    width: 20px;
    height: 20px;
    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;
    display: inline-block;
    width: 20px;
    height: 20px;
    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 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .calendar-day {
        min-height: 80px;
    }
    
    .climb-info {
        grid-template-columns: 1fr;
    }
}

/* 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;
}