


.photo-upload-input {
    display: none;
}


.photo-upload-btn {
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 16px 20px;
    background-color: #0069a8;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: none;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
}

.photo-upload-btn:active,
.photo-upload-btn:focus {
    outline: none;
}
.photo-upload-btn:hover {
    scrollbar-color: initial;
}

.photo-upload-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}


.photo-upload-btn.photo-upload-loading {
    position: relative;
    padding-right: 44px;
}

.photo-upload-btn.photo-upload-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    right: 16px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: photo-upload-spinner 0.6s linear infinite;
}

@keyframes photo-upload-spinner {
    to {
        transform: rotate(360deg);
    }
}


.photo-upload-section {
    margin-top: 20px;
    margin-bottom: 80px;
}

.photo-upload-section-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}


.photo-gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 15px;
}

.photo-gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: #f5f5f5;
}

.photo-gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.photo-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-gallery-item-delete {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #dc3545;
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

.photo-gallery-item-delete:hover {
    background-color: #dc3545;
    color: white;
}


.photo-gallery-empty {
    text-align: center;
    padding: 20px 10px;
    color: #999;
    font-size: 13px;
    line-height: 1.5;
    grid-column: 1 / -1;
    background-color: #f9f9f9;
    border-radius: 6px;
    border: 1px dashed #ddd;
}


.photo-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.photo-modal-overlay.active {
    display: flex;
}

.photo-modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.photo-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.photo-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.photo-modal-close:hover {
    color: #ccc;
}


@media (max-width: 768px) {
    .photo-gallery {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .photo-upload-btn {
        width: 100%;
        min-height: 52px;
        padding: 16px 20px;
    }
    
    .photo-modal-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .photo-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }
}


.pswp-delete-btn {
    position: absolute !important;
    bottom: 20px !important;
    right: 20px !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    height: auto !important;
    padding: 10px 20px !important;
    background-color: rgba(220, 38, 38, 0.85) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    z-index: 100 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    opacity: 1 !important;
}

.pswp-delete-btn:hover {
    background-color: rgba(185, 28, 28, 0.95) !important;
}



.pswp__counter {
    flex-shrink: 0;
    white-space: nowrap;
}

.pswp-caption-slot {
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    min-width: 0;
    height: 60px;
    margin-right: auto;
    padding: 0 12px;
    overflow: hidden;
    color: #fff;
}


.pswp-action-bar {
    position: absolute;
    left: 20px;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 130px);
    z-index: 100;
}
