/* Photo Upload Modal Styles */
.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.photo-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    z-index: 2;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.photo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e1e8ed;
}

.photo-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #2c3e50;
    font-weight: 600;
}

.photo-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    transition: color 0.2s;
}

.photo-modal-close:hover {
    color: #333;
}

.photo-modal-tabs {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    background: #fafafa;
}

.photo-tab {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.photo-tab:hover {
    background: #f5f5f5;
    color: #009c3b;
}

.photo-tab.active {
    color: #009c3b;
    background: white;
    border-bottom-color: #009c3b;
}

.photo-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
}

.photo-tab-content {
    display: none;
}

.photo-tab-content.active {
    display: block;
}

/* My Photo Tab */
.upload-area {
    border: 2px dashed #d1d1d1;
    border-radius: 8px;
    padding: 60px 40px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: #009c3b;
    background: #f0fff5;
}

/* Stock Photo Tab */
.photo-search-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.photo-search-bar {
    display: flex;
    gap: 10px;
}

.photo-search-bar .form-control {
    flex: 1;
}

.suggested-terms {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #009c3b;
}

.suggested-terms ul {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.suggested-terms li {
    display: inline-block;
}

.suggested-terms a {
    color: #009c3b;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.suggested-terms a:hover {
    color: #007a2e;
    text-decoration: underline;
}

.photo-search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    min-height: 200px;
}

.photo-search-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.photo-search-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 156, 59, 0.3);
}

.photo-search-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-credit {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-top: 20px;
}

.photo-credit a {
    color: #009c3b;
    text-decoration: none;
}

.photo-credit a:hover {
    text-decoration: underline;
}

/* Loading State */
.photo-search-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.photo-search-loading i {
    font-size: 32px;
    color: #009c3b;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .photo-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .photo-modal-header {
        padding: 15px;
    }
    
    .photo-modal-body {
        padding: 15px;
    }
    
    .photo-search-results {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .suggested-terms ul {
        flex-direction: column;
        gap: 8px;
    }
}
