/* Hiking Trip Reports Frontend Styles */

/* Trip Report Details Section - Auto-added to content */
.trip-report-details-section {
    margin: 30px 0;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.trip-report-details-section h3 {
    color: #27ae60;
    margin: 0;
    padding: 20px 25px 15px 50px;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f9fa;
    position: relative;
    font-size: 18px;
}

.trip-report-details-section h3:before {
    content: "•";
    position: absolute;
    left: 25px;
    top: 20px;
    font-weight: bold;
    color: #3498db;
    font-size: 18px;
}

/* Different symbols for different sections */
.trip-report-details h3:before { 
    content: "ⓘ"; 
    font-size: 16px;
    color: #2c3e50;
}
.trail-conditions h3:before { 
    content: "►"; 
    color: #27ae60;
}
.road-conditions h3:before { 
    content: "⚬"; 
    color: #e67e22;
}
.bugs h3:before { 
    content: "⚠"; 
    color: #e74c3c;
}
.snow h3:before { 
    content: "❅"; 
    color: #3498db;
    font-size: 14px;
}

/* Fallback for systems that don't support special characters */
@supports not (content: "ⓘ") {
    .trip-report-details h3:before { content: "[i]"; }
    .trail-conditions h3:before { content: ">>"; }
    .road-conditions h3:before { content: "•"; }
    .bugs h3:before { content: "!"; }
    .snow h3:before { content: "*"; }
}

/* Trip Details Box - First section */
.trip-report-details {
    background: #f8f9fa;
    padding: 25px;
    margin: 0;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid #f0f0f0;
}

.trip-report-details h3 {
    background: #e8f4fd;
    margin: -25px -25px 20px -25px;
    border-bottom: 1px solid #d4e8f7;
}

.trip-report-details p {
    margin: 8px 0;
    font-size: 16px;
}

/* Conditions Content Sections - All connected */
.trail-conditions,
.road-conditions,
.bugs,
.snow {
    margin: 0;
    padding: 25px;
    background: #fff;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 0;
}

/* Remove border from last section */
.snow {
    border-bottom: none;
}

/* Section content styling */
.conditions-content {
    line-height: 1.7;
    margin-top: 15px;
}

.conditions-content p {
    margin-bottom: 15px;
}

.conditions-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Text-only sections (bugs/snow) styling */
.bugs .conditions-content p,
.snow .conditions-content p {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    border-left: 3px solid #ddd;
    margin: 15px 0 0 0;
    font-style: italic;
}

.bugs .conditions-content p {
    border-left-color: #e74c3c;
}

.snow .conditions-content p {
    border-left-color: #3498db;
}

/* Frontend Trip Report Form */
.trip-report-form-container {
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.trip-report-form {
    padding: 0;
}

.form-header {
    background: #f8f9fa;
    padding: 25px;
    border-bottom: 1px solid #e1e1e1;
    text-align: center;
}

.form-header h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 24px;
}

.form-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.form-section {
    padding: 25px;
    border-bottom: 1px solid #f0f0f0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h4 {
    margin: 0 0 20px 0;
    color: #27ae60;
    font-size: 18px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8f5e8;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-field {
    flex: 1;
    margin-bottom: 20px;
}

.form-field.half {
    flex: 0 0 calc(50% - 10px);
}

.form-field:last-child {
    margin-bottom: 0;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-field textarea {
    resize: vertical;
    min-height: 80px;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #999;
    font-style: italic;
}

.form-actions {
    padding: 25px;
    background: #f8f9fa;
    border-top: 1px solid #e1e1e1;
    text-align: center;
}

.submit-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 180px;
}

.submit-btn:hover {
    background: #229954;
}

.submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.form-note {
    margin-top: 15px;
}

.form-note small {
    color: #666;
    font-style: italic;
}

/* Form Messages */
#form-messages {
    margin-top: 20px;
}

.form-success,
.form-error,
.form-loading,
.trip-report-success {
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.form-success,
.trip-report-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

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

.form-loading {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .trip-report-form-container {
        margin: 10px;
        border-radius: 5px;
    }
    
    .form-header,
    .form-section,
    .form-actions {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-field.half {
        flex: none;
    }
    
    .form-header h3 {
        font-size: 20px;
    }
    
    .form-header p {
        font-size: 14px;
    }
    
    .submit-btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
}

/* Trip Reports Container */
.trip-reports-container {
    margin: 20px 0;
}

/* Trip Report Summary (for listings) */
.trip-report-summary {
    border: 1px solid #e1e1e1;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    background: #f9f9f9;
    transition: box-shadow 0.3s ease;
}

.trip-report-summary:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.trip-report-summary h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.trip-report-summary h3 a {
    text-decoration: none;
    color: #2c3e50;
}

.trip-report-summary h3 a:hover {
    color: #3498db;
}

.trip-report-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.trip-report-meta span {
    background: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.trip-report-excerpt {
    margin-top: 15px;
    line-height: 1.6;
}

/* Trip report preview text instead of excerpt */
.trip-report-preview {
    margin-top: 15px;
    line-height: 1.6;
    color: #555;
    font-style: italic;
}

/* Single Trip Report */
.single-trip-report {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.single-trip-report h2 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.trip-report-content {
    margin-bottom: 30px;
    line-height: 1.7;
    font-size: 16px;
}

/* Images within content */
.single-trip-report img,
.trip-report-summary img,
.trip-report-details-section img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 10px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .trip-report-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .trip-report-meta span {
        display: inline-block;
        margin-right: 10px;
        margin-bottom: 5px;
    }
    
    .single-trip-report {
        padding: 10px;
    }
    
    .trip-report-details {
        padding: 15px;
    }
    
    .trail-conditions,
    .road-conditions,
    .bugs,
    .snow {
        padding: 15px;
    }
    
    .trip-report-details-section {
        margin: 20px 0;
        padding-top: 15px;
    }
    
    .trip-report-details-section h3 {
        padding-left: 20px;
    }
}

/* Print Styles */
@media print {
    .trip-report-summary {
        border: 1px solid #ccc;
        break-inside: avoid;
    }
    
    .single-trip-report {
        max-width: none;
    }
    
    .trip-report-details-section h3:before {
        content: "";
    }
}