/* Fiskedagbok Frontend Styles */

.fiskedagbok-form-container,
.fiskedagbok-list-container,
.fiskedagbok-search-container {
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.fiskedagbok-form h3,
.fiskedagbok-list-container h3,
.fiskedagbok-search-container h3 {
    margin-top: 0;
    color: #2c5282;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

/* Year Filter Styles */
.year-filter-container {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.year-filter-container label {
    font-weight: bold;
    color: #374151;
    margin-right: 10px;
}

.year-filter-container select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

/* Search Styles */
.search-form {
    margin-bottom: 20px;
}

.search-form .form-group {
    display: flex;
    gap: 10px;
    align-items: end;
    margin-bottom: 10px;
}

.search-form label {
    font-weight: bold;
    color: #374151;
    margin-bottom: 5px;
    display: block;
}

.search-form input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
}

.search-button {
    background: #3b82f6;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-button:hover {
    background: #2563eb;
}

.search-message {
    margin: 10px 0;
}

.search-message .loading {
    color: #3b82f6;
    font-weight: bold;
}

.search-message .success {
    color: #059669;
    font-weight: bold;
}

.search-message .error {
    color: #dc2626;
    font-weight: bold;
}

/* Catch Cards Grid */
.catches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.catch-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.catch-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.catch-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f3f4f6;
}

.catch-date {
    font-weight: bold;
    color: #1f2937;
}

.catch-fish-type {
    background: #3b82f6;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: bold;
}

.weather-icon {
    font-size: 16px;
    cursor: help;
}

.catch-card-body {
    margin-bottom: 15px;
}

.catch-location {
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
}

.catch-specs {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.catch-meta {
    display: flex;
    gap: 10px;
    font-size: 13px;
    margin-bottom: 8px;
}

.catch-meta .released {
    color: #059669;
    font-weight: bold;
}

.catch-meta .kept {
    color: #dc2626;
    font-weight: bold;
}

.fisher-info {
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
}

.catch-card-actions {
    display: flex;
    gap: 10px;
}

.view-details-btn,
.claim-catch-btn {
    flex: 1;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.view-details-btn {
    background: #6b7280;
    color: white;
}

.view-details-btn:hover {
    background: #4b5563;
}

.claim-catch-btn {
    background: #059669;
    color: white;
}

.claim-catch-btn:hover {
    background: #047857;
}

/* Detailed Catch Modal */
.catch-details-modal .modal-content {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.catch-details-full h3 {
    color: #1f2937;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.details-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 4px solid #3b82f6;
}

.details-section h4 {
    margin: 0 0 10px 0;
    color: #374151;
    font-size: 16px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.details-grid span {
    font-size: 14px;
    color: #4b5563;
}

.weather-section {
    background: #eff6ff;
    border-left-color: #3b82f6;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.weather-details span {
    background: #dbeafe;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
    color: #1e40af;
}

.fetch-weather-btn {
    background: #3b82f6;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.fetch-weather-btn:hover {
    background: #2563eb;
}

/* Water Level Section */
.water-level-section {
    background: #f0fdf4;
    border-left-color: #10b981;
}

.water-data {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.water-data span {
    background: #d1fae5;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
    color: #047857;
}

.water-error {
    color: #dc2626;
    font-style: italic;
    margin: 10px 0;
}

.details-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.close-details-btn {
    background: #6b7280;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.close-details-btn:hover {
    background: #4b5563;
}

/* Form Styles */
.fiskedagbok-form .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.fiskedagbok-form .form-group {
    flex: 1;
}

.fiskedagbok-form .form-group.checkbox-group {
    display: flex;
    align-items: center;
    margin-top: 24px;
}

.fiskedagbok-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #374151;
}

.fiskedagbok-form input,
.fiskedagbok-form select,
.fiskedagbok-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.fiskedagbok-form input:focus,
.fiskedagbok-form select:focus,
.fiskedagbok-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.fiskedagbok-form .submit-button {
    background: #3b82f6;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.fiskedagbok-form .submit-button:hover {
    background: #2563eb;
}

.fiskedagbok-form .submit-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Water Station Override Field */
.fiskedagbok-form .form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
    line-height: 1.4;
}

#edit-water-station {
    background-color: #f8fffe;
    border-color: #10b981;
}

#edit-water-station option[value=""] {
    color: #6b7280;
    font-style: italic;
}

#edit-water-station option[value]:not([value=""]) {
    color: #047857;
    font-weight: 500;
}

/* Form Messages */
.form-message {
    margin-top: 15px;
}

.form-message .loading {
    color: #3b82f6;
    font-weight: bold;
}

.form-message .success {
    color: #059669;
    font-weight: bold;
    padding: 10px;
    background: #d1fae5;
    border: 1px solid #10b981;
    border-radius: 4px;
}

.form-message .error {
    color: #dc2626;
    font-weight: bold;
    padding: 10px;
    background: #fee2e2;
    border: 1px solid #ef4444;
    border-radius: 4px;
}

/* Catch List Styles */
.catches-summary {
    background: #f8fafc;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #3b82f6;
}

.catch-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    transition: box-shadow 0.3s;
}

.catch-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.catch-header {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 10px;
    font-weight: bold;
}

.catch-date {
    color: #1f2937;
    font-size: 16px;
}

.catch-time {
    color: #6b7280;
    font-size: 14px;
}

.catch-fish-type {
    background: #3b82f6;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    text-transform: uppercase;
}

.catch-details {
    margin-bottom: 15px;
}

.catch-location,
.catch-specs,
.catch-meta {
    margin-bottom: 8px;
    color: #4b5563;
    font-size: 14px;
}

.catch-specs span,
.catch-meta span {
    margin-right: 15px;
    display: inline-block;
}

.released.yes {
    color: #059669;
    font-weight: bold;
}

.released.no {
    color: #dc2626;
    font-weight: bold;
}

.catch-notes {
    background: #f9fafb;
    padding: 10px;
    border-radius: 4px;
    font-style: italic;
    margin-top: 10px;
}

.catch-actions {
    display: flex;
    gap: 10px;
}

.edit-catch-btn,
.delete-catch-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.edit-catch-btn {
    background: #f59e0b;
    color: white;
}

.edit-catch-btn:hover {
    background: #d97706;
}

.delete-catch-btn {
    background: #ef4444;
    color: white;
}

.delete-catch-btn:hover {
    background: #dc2626;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    position: relative;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #9ca3af;
}

.close:hover {
    color: #374151;
}

.no-catches {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.no-catches p {
    margin: 10px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fiskedagbok-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .catch-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .catch-specs span,
    .catch-meta span {
        display: block;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}