/**
 * Wedding Photo Uploader CSS
 * Styles for the photo uploader form and gallery
 */

/* Photo Uploader Form */
.wedding-photo-uploader {
    max-width: 100%;
    margin: 0 auto 40px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.wedding-photo-uploader h3 {
    margin-top: 0;
    font-size: 28px;
    color: #666;
    font-weight: 300;
}

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

.photo-upload-area {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
    cursor: pointer;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.photo-upload-area:hover, .photo-upload-area.dragover {
    border-color: #3498db;
    background-color: #f0f8ff;
}

.upload-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.photo-icon {
    display: block;
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233498db'%3E%3Cpath d='M18 20H4V6h4.5l2-2h5l2 2H18v14zm-9-8.5l1.5-2 2 2.5 3-4 3 4.5v3H6v-4zm8-4a1 1 0 1 0 0-2 1 1 0 0 0 0 2z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.upload-prompt p {
    font-size: 18px;
    margin: 0 0 10px;
    color: #3498db;
}

.form-group input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.description {
    font-size: 14px;
    color: #777;
    margin-top: 5px;
}

button#submit-photos {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 18px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    width: 200px;
}

button#submit-photos:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

button#submit-photos:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Upload Progress */
.upload-progress {
    margin: 15px 0;
    background-color: #eee;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    height: 25px;
}

.progress-bar {
    background-color: #2ecc71;
    height: 100%;
    width: 0;
    transition: width 0.3s;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 0 2px #fff;
}

/* Status Messages */
.status-message {
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.status-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

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

/* Photo Gallery */
.wedding-photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    aspect-ratio: 1 / 1;
    background-color: #f9f9f9;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: all 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-actions {
    position: absolute;
    bottom: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-actions {
    opacity: 1;
}

.download-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: #3498db;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.download-button:hover {
    background-color: #3498db;
    color: white;
    transform: scale(1.1);
}

.download-button i {
    font-size: 18px;
}

/* Admin Styles */
.wp-admin .wedding-photo-columns .column-thumbnail {
    width: 80px;
}

.wp-admin .wedding-photo-columns .column-download {
    width: 120px;
}

.wp-admin .wedding-photo-columns .column-date_taken {
    width: 150px;
}

.wp-admin .wedding-photo-columns .time {
    color: #777;
    font-size: 12px;
}

.wp-admin .wedding-photo-columns .button-small {
    padding: 0 5px;
    font-size: 12px;
    line-height: 2;
    min-height: auto;
}

.wp-admin .wedding-photo-columns .button-small .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 1;
    margin: 3px 2px 0 0;
}

.wp-admin .date-filter label {
    margin-right: 5px;
}

.wp-admin .date-filter input[type="date"] {
    width: auto;
    margin-right: 10px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .wedding-photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .wedding-photo-uploader {
        padding: 15px;
    }
    
    .wedding-photo-uploader h3 {
        font-size: 22px;
    }
    
    .photo-upload-area {
        padding: 20px 15px;
        min-height: 150px;
    }
    
    .photo-icon {
        width: 40px;
        height: 40px;
    }
    
    .upload-prompt p {
        font-size: 16px;
    }
    
    .description {
        font-size: 12px;
    }
    
    button#submit-photos {
        width: 100%;
        padding: 10px;
        font-size: 16px;
    }
    
    .download-button {
        width: 36px;
        height: 36px;
        opacity: 1;
    }
    
    .gallery-item-actions {
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .wedding-photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 8px;
    }
    
    .download-button {
        width: 32px;
        height: 32px;
    }
    
    .download-button i {
        font-size: 14px;
    }
}