.collections-archive-container,
.single-collection-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.collection-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}

.collection-card:hover {
    transform: translateY(-5px);
}

.collection-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.collection-card h2 {
    padding: 15px;
    margin: 0;
    font-size: 1.2em;
}

.collection-meta {
    padding: 0 15px 15px;
    color: #666;
}

.photos-grid {
    width: 100%;
    margin: 40px auto;
}

.grid-item {
    width: calc(33.333% - 20px);
    margin-bottom: 20px;
}

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

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.photo-card img {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
}

.photo-meta {
    padding: 15px;
    background: #f5f5f5;
}

.version {
    display: inline-block;
    padding: 3px 8px;
    background: #e0e0e0;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
}

.notes {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* Responsive grid */
@media (max-width: 1200px) {
    .grid-item {
        width: calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .grid-item {
        width: 100%;
    }
}

.person-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 0, 0.5);
    border: 2px solid #ff0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
}

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

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

.photo-notes-form textarea {
    width: 100%;
    margin: 10px 0;
}

.new-collection-form-container {
    max-width: 600px;
    margin: 30px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.upload-preview {
    margin: 15px 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.preview-count {
    grid-column: 1 / -1;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 10px;
}

.preview-item {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    padding-bottom: 8px;
}

.preview-image-container {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
}

.preview-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .filename {
    display: block;
    padding: 4px 8px;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #666;
}

.file-progress {
    padding: 0 8px;
}

.progress-bar {
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
    margin: 4px 0;
}

.progress-bar .progress {
    height: 100%;
    background: #2271b1;
    width: 0;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 10px;
    color: #666;
    text-align: center;
}

.preview-item.upload-complete .progress-bar .progress {
    background: #00a32a;
}

.preview-item.upload-complete .progress-text {
    color: #00a32a;
}

.upload-error {
    color: #d63638;
}

/* Add these styles */
.photo-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.delete-photo {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #dc3545;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.delete-photo:hover {
    opacity: 1;
}

.delete-photo .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.photo-card {
    position: relative;
}

/* Modal styles */
.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: absolute;
    top: 50px;
    left: 50px;
    right: 50px;
    bottom: 50px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 1010;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.modal-close .dashicons {
    width: 30px;
    height: 30px;
    font-size: 30px;
    color: #fff;
}

.modal-main {
    display: flex;
    height: 100%;
}

.modal-image-container {
    flex: 1;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tagging-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: default;
    pointer-events: auto !important;
}

.tagging-overlay.tagging-active {
    cursor: crosshair;
}

.modal-sidebar {
    width: 300px;
    background: #f5f5f5;
    border-left: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.modal-tools {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    gap: 10px;
}

.tool-button {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
    border-radius: 4px;
    transition: all 0.2s;
}

.tool-button:hover {
    background: #e0e0e0;
    color: #000;
}

.tool-button.active {
    background: #2271b1;
    color: #fff;
}

.modal-info {
    padding: 15px;
    flex: 1;
    overflow-y: auto;
}

.photo-tags h3,
.photo-notes-section h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.tags-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tags-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: #fff;
    border-radius: 4px;
    margin-bottom: 5px;
}

.tag-remove {
    background: none;
    border: none;
    padding: 4px;
    color: #dc3545;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.tag-remove:hover {
    opacity: 1;
    color: #dc3545;
    background: none;
}

.tag-name {
    flex: 1;
    margin-right: 8px;
}

.photo-notes-section {
    margin-top: 20px;
}

.modal-notes-form textarea {
    width: 100%;
    min-height: 100px;
    margin-bottom: 10px;
    padding: 8px;
}

/* Person tag marker in modal */
.person-tag-marker {
    position: absolute;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 0, 0.3);
    border: 2px solid #ff0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: all 0.2s;
}

.person-tag-marker:hover {
    background: rgba(255, 255, 0, 0.5);
}

.person-tag-label {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    transform: translateY(20px);
}

/* Adjust padding for smaller screens */
@media (max-width: 768px) {
    .modal-content {
        top: 20px;
        left: 20px;
        right: 20px;
        bottom: 20px;
    }
}

/* Add these styles */
.person-name-prompt {
    position: fixed !important;
    background: #fff !important;
    padding: 5px !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
    z-index: 2000 !important;
}

.person-name-input {
    border: 1px solid #ddd !important;
    padding: 8px !important;
    border-radius: 4px !important;
    width: 200px !important;
    font-size: 14px !important;
    display: block !important;
    background: #fff !important;
    margin: 0 !important;
    height: auto !important;
    box-sizing: border-box !important;
}

.ui-autocomplete {
    position: fixed !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 2001 !important;
}

.ui-autocomplete .ui-menu-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
}

.ui-autocomplete .ui-menu-item:hover,
.ui-autocomplete .ui-state-focus {
    background: #f0f0f0;
}

.ui-helper-hidden-accessible {
    display: none;
}

/* Ensure modal elements don't interfere */
.modal-content,
.modal-overlay,
.modal-image-container,
.tagging-overlay {
    pointer-events: auto !important;
}

.tagging-overlay {
    z-index: 1100;
}

.temp-tag-marker {
    pointer-events: none;
}

/* Ensure the tagging overlay can receive clicks */
.tagging-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.tagging-overlay.tagging-active {
    cursor: crosshair;
} 