/* ==========================================================================
   PHOTO TEMPLATES STYLES
   ========================================================================== */

/* ==========================================================================
   PHOTO GALLERY PARTIAL STYLES
   ========================================================================== */

.photo-gallery-section {
    margin-top: 2rem;
}

.photo-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

.photo-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 2rem;
    transition: transform 0.2s;
    position: relative;
}

.photo-card img {
    max-height: 250px;
}

.photo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.photo-card-body {
    padding: 1rem;
}

.photo-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: bold;
}

.hashtags {
    color: #1da1f2;
}

.hashtags a {
    color: #1da1f2;
    text-decoration: none;
    margin-right: 8px;
}

.hashtags a:hover {
    text-decoration: underline;
}

.no-photos {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 8px;
    color: #666;
}

.gallery-header {
    text-align: center;
    margin-bottom: 2rem;
}

.gallery-pagination {
    text-align: center;
    margin-top: 2rem;
}

/* ==========================================================================
   PHOTO LIST PAGE STYLES
   ========================================================================== */

/* Tag Cloud and Filtering */
.tag-cloud .tag-badge {
    margin: 2px;
    font-size: 0.8rem;
    padding: 4px 8px;
    background: #007acc;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
}

.tag-cloud .tag-badge:hover {
    background: #005c99;
    color: white;
}

.tag-cloud .tag-badge.selected {
    background: #28a745;
}

.photo-meta {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

.search-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.current-tag-info {
    background: #e3f2fd;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #2196f3;
}

.sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Multi-select filter styles */
.filter-tags-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.selected-filters {
    margin-bottom: 1rem;
}

.selected-filter-tag {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 4px 8px;
    margin: 2px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.selected-filter-tag .remove-filter {
    margin-left: 6px;
    cursor: pointer;
    font-weight: bold;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.selected-filter-tag .remove-filter:hover {
    background: rgba(255,255,255,0.5);
}

.tag-filter-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.quick-filters {
    margin-top: 1rem;
}

.quick-filters h4 {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.filter-tag-option {
    display: inline-block;
    margin: 2px;
    font-size: 0.8rem;
    padding: 4px 8px;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    cursor: pointer;
}

.filter-tag-option:hover {
    background: #e9ecef;
    color: #495057;
    text-decoration: none;
}

.filter-tag-option.selected {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

/* ==========================================================================
   HASHTAG AUTOCOMPLETE STYLES
   ========================================================================== */

.hashtag-input-container {
    position: relative;
}

.hashtag-display {
    min-height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 8px;
    background: #f9f9f9;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: flex-start;
}

.hashtag-display:empty::before {
    content: "Selected hashtags will appear here...";
    color: #999;
    font-style: italic;
}

.hashtag-item {
    background: #1da1f2;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hashtag-remove {
    cursor: pointer;
    font-weight: bold;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.hashtag-remove:hover {
    background: rgba(255,255,255,0.5);
}

#hashtag-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.hashtag-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hashtag-suggestion {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hashtag-suggestion:hover,
.hashtag-suggestion.highlighted {
    background: #f0f8ff;
}

.hashtag-suggestion:last-child {
    border-bottom: none;
}

.hashtag-suggestion.create-new {
    background: #e8f5e8;
    font-style: italic;
}

.hashtag-suggestion.create-new:hover {
    background: #d4edda;
}

.hashtag-suggestion .hashtag-preview {
    color: #1da1f2;
    font-weight: bold;
}

/* ==========================================================================
   FORM STYLES
   ========================================================================== */

.form-field .error {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 4px;
}

.help-text {
    color: #666;
    font-size: 0.85em;
    margin-top: 4px;
    display: block;
}

.form-container h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.current-image {
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

.current-image img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 4px;
}

.form-field-note {
    margin-bottom: 10px;
    color: #666;
    font-size: 0.9em;
}

/* ==========================================================================
   DELETE MODE STYLES
   ========================================================================== */

.delete-mode .photo-checkbox-container {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    padding: 5px;
}

.delete-mode .photo-card {
    position: relative;
}

.delete-mode .photo-link {
    pointer-events: none;
}

.photo-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.photo-item.selected .photo-card {
    border: 3px solid #dc3545;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.3);
}

.button.danger {
    background: #dc3545;
    color: white;
}

.button.danger:hover {
    background: #c82333;
}

.button.secondary {
    background: #6c757d;
    color: white;
}

.button.secondary:hover {
    background: #545b62;
}

#delete-actions {
    margin-top: 10px;
}

#delete-actions button {
    margin-right: 10px;
}

/* ==========================================================================
   PHOTO ACTIONS STYLES
   ========================================================================== */

.photo-actions {
    opacity: 0;
    transition: opacity 0.2s;
}

.photo-card:hover .photo-actions {
    opacity: 1;
}

.photo-actions .button {
    padding: 4px 8px;
    font-size: 0.8em;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.photo-actions .button:hover {
    background: white;
    color: #007acc;
}

/* Hide edit buttons in delete mode */
.delete-mode .photo-actions {
    display: none;
}

/* ==========================================================================
   PHOTO DETAIL PAGE STYLES
   ========================================================================== */

.photo-detail-image {
    text-align: center;
    margin-bottom: 2rem;
}

.photo-detail-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.photo-detail-content {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.photo-detail-hashtags {
    margin-bottom: 1rem;
}

.photo-detail-hashtags a {
    color: #1da1f2;
    text-decoration: none;
    margin-right: 1rem;
}

.photo-related-photos {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
}

.photo-related-item {
    margin-bottom: 1rem;
}

.photo-related-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

/* ==========================================================================
   MANAGEMENT PAGE STYLES
   ========================================================================== */

.notification-container {
    position: relative;
    display: inline-block;
}

.badge {
    position: absolute;
    top: -.25em;
    right: -2em;
    background-color: red;
    color: white;
    border-radius: 50%;
    width: 1.5em;
    height: 1.5em;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8em;
    padding: 2px;
}