/* Custom Photo Album Plugin Styles - v2.0 */

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

.photo-album-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Album Header */
.album-header {
    text-align: center;
    margin-bottom: 40px;
}

.album-header h2 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 20px;
}

.album-title-input {
    width: 100%;
    max-width: 700px;
    font-size: 1.5em;
    font-weight: 500;
    text-align: center;
    border: none;
    border-bottom: 3px solid #e1e5e9;
    background: transparent;
    padding: 15px 10px;
    color: #333;
    outline: none;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.album-title-input:focus {
    border-bottom-color: #3498db;
    transform: translateY(-2px);
}

.album-description-input {
    width: 100%;
    max-width: 700px;
    min-height: 80px;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    resize: vertical;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s ease;
}

.album-description-input:focus {
    border-color: #3498db;
}

/* Upload Section */
.upload-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 40px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 40px;
    border: 3px dashed rgba(255,255,255,0.5);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: white;
}

.upload-section:hover,
.upload-section.drag-over {
    border-color: rgba(255,255,255,0.9);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102,126,234,0.4);
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-8px); }
}

.upload-section h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 2em;
    font-weight: 600;
}

.upload-section p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 25px;
    font-size: 1.2em;
}

.upload-button {
    background: white;
    color: #667eea;
    padding: 18px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.upload-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.upload-info {
    margin-top: 20px;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

/* Progress Bar */
.upload-progress {
    margin: 30px 0;
    background: #f8f9fa;
    border-radius: 25px;
    overflow: hidden;
    position: relative;
    height: 40px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-bar {
    height: 100%;
    background: #f8f9fa;
    border-radius: 25px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 25px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-weight: 700;
    font-size: 16px;
}

/* Album Stats */
.album-stats {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    color: #495057;
    font-size: 16px;
}

.album-stats span {
    margin: 0 20px;
    padding: 10px 20px;
    background: white;
    border-radius: 25px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    font-weight: 600;
}

/* Photo Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.photo-item {
    position: relative;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.photo-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.photo-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

.photo-caption {
    padding: 20px;
    background: white;
}

.photo-caption input {
    width: 100%;
    border: none;
    font-size: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    outline: none;
    transition: background 0.3s ease;
}

.photo-caption input:focus {
    background: #e9ecef;
}

.delete-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(220, 53, 69, 0.95);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

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

.delete-button:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.15) rotate(90deg);
}

/* Album Actions */
.album-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 50px 0;
    flex-wrap: wrap;
}

.action-button {
    padding: 18px 35px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 180px;
}

.save-album {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.save-album:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.4);
}

.view-album {
    background: linear-gradient(45deg, #17a2b8, #0056b3);
    color: white;
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.3);
}

.view-album:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(23, 162, 184, 0.4);
}

.clear-album {
    background: linear-gradient(45deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

.clear-album:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.4);
}

/* Share Section */
.share-section {
    text-align: center;
    margin: 40px 0;
    padding: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.share-section h3 {
    color: #28a745;
    font-size: 2em;
    margin-bottom: 15px;
}

.share-link-container {
    display: flex;
    gap: 15px;
    max-width: 700px;
    margin: 20px auto;
}

.share-link-container input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 16px;
    background: white;
}

.copy-button {
    padding: 15px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.copy-button:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

/* Messages */
.album-messages {
    margin: 20px 0;
    text-align: center;
}

.message {
    padding: 15px 25px;
    border-radius: 10px;
    margin: 15px 0;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #bee5eb;
}

/* ==================== VIEW ALBUM STYLES ==================== */

.view-album-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Album Header */
.view-album-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 10px 40px rgba(102,126,234,0.3);
}

.view-album-header .album-title {
    font-size: 3em;
    margin-bottom: 15px;
    font-weight: 700;
}

.view-album-header .album-description {
    font-size: 1.3em;
    margin-bottom: 20px;
    opacity: 0.95;
}

.album-meta {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.album-meta span {
    padding: 10px 25px;
    background: rgba(255,255,255,0.2);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    font-weight: 600;
}

/* Photo Gallery Grid */
.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin: 60px 0;
}

.gallery-photo-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
}

.gallery-photo-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
}

.photo-wrapper {
    position: relative;
    overflow: hidden;
}

.gallery-photo {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-photo-item:hover .gallery-photo {
    transform: scale(1.1);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-photo-item:hover .photo-overlay {
    opacity: 1;
}

.view-fullsize {
    padding: 15px 30px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
}

.view-fullsize:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(255,255,255,0.3);
}

.photo-caption-display {
    padding: 20px;
    text-align: center;
    font-size: 16px;
    color: #495057;
    background: white;
}

/* Order Section */
.order-album-section {
    margin: 80px 0;
}

.order-callout {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 25px;
    color: white;
    box-shadow: 0 15px 50px rgba(240,147,251,0.4);
}

.order-callout h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    font-weight: 700;
}

.order-callout p {
    font-size: 1.4em;
    margin-bottom: 30px;
    opacity: 0.95;
}

.order-button {
    padding: 20px 50px;
    background: white;
    color: #f5576c;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.order-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

/* Order Form */
.order-form-container {
    max-width: 800px;
    margin: 60px auto;
    padding: 50px;
    background: white;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
}

.order-form-container h3 {
    text-align: center;
    font-size: 2.2em;
    color: #2c3e50;
    margin-bottom: 40px;
}

.form-row {
    margin-bottom: 30px;
}

.form-row label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.form-row input,
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    outline: none;
    border-color: #667eea;
}

.order-summary {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
}

.order-summary p {
    margin: 10px 0;
    font-size: 16px;
}

.order-note {
    color: #6c757d;
    font-style: italic;
}

.form-actions {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.submit-order-button {
    flex: 1;
    padding: 18px;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.submit-order-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40,167,69,0.4);
}

.cancel-button {
    padding: 18px 40px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cancel-button:hover {
    background: #5a6268;
}

/* Order Success */
.order-success {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 25px;
    margin: 40px 0;
}

.success-icon {
    font-size: 5em;
    margin-bottom: 20px;
}

.order-success h3 {
    color: #155724;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.order-success p {
    font-size: 1.2em;
    color: #155724;
    margin: 15px 0;
}

/* Photo Modal */
.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 10000;
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: white;
    color: #333;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
}

#modal-photo {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.modal-prev,
.modal-next {
    padding: 15px 30px;
    background: white;
    color: #333;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
}

.modal-prev:hover,
.modal-next:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(255,255,255,0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .photo-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .photo-album-wrapper,
    .view-album-container {
        padding: 20px 15px;
    }
    
    .view-album-header .album-title {
        font-size: 2em;
    }
    
    .photo-grid,
    .photo-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .order-form-container {
        padding: 30px 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .photo-grid,
    .photo-gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .upload-section {
        padding: 40px 20px;
    }
    
    .share-link-container {
        flex-direction: column;
    }
}

/* Print Styles */
@media print {
    .upload-section,
    .album-actions,
    .delete-button,
    .order-album-section,
    .photo-overlay,
    .view-fullsize {
        display: none !important;
    }
    
    .photo-gallery-grid {
        display: block;
    }
    
    .gallery-photo-item {
        break-inside: avoid;
        margin-bottom: 30px;
        page-break-inside: avoid;
    }
    
    .gallery-photo {
        height: auto;
        max-height: 500px;
    }
}