/* Opšti stilovi za photo book */
.photo-book {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.coverphoto-page {
    width: 435px;
    height: 220px;
    border: 2px solid #000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px;
    background: #f8f8f8;
}

.coverphoto-spot {
    border: 1px dashed #666;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.coverphoto-spot.large-spot {
    height: 200px; /* Prilagodite visinu po potrebi */
}

.coverfotospot {
    width: 45%; /* Prilagodite širinu po potrebi */
    height: 90%; /* Prilagodite visinu po potrebi */
    border: 1px dashed #666;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.coverfotospot img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Osigurava da slika dobro pristaje */
}

.photo-page {
    width: 435px;
    height: 220px;
    border: 2px solid #000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px;
    background: #f8f8f8;
}

.btn-danger {
    margin-top: 10px;
    width: 10%;
    max-width: 435px;
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-danger:hover {
    background-color: #c82333;
}

.photo-spot {
    border: 1px dashed #666;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.photo-spot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
}

.crop-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 10;
    border-radius: 5px;
}

.vertical-spot { width: 30%; height: 90%; }
.small-square { width: 95px; height: 95px; }
.large-spot { width: 45%; height: 90%; }

/* Stilovi za Cropper modal */
#cropperModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Stilovi za Cropper kontejner */
/* Dodajte u vaš CSS */
.cropper-container canvas {
    touch-action: none;
}
}

/* Stilovi za sliku unutar Cropper-a */
#cropImage {
    max-width: 100%; /* Koristi punu širinu kontejnera */
    max-height: 80vh; /* Ograničava visinu slike */
    display: block;
    margin: 0 auto;
    background: repeating-conic-gradient(#f0f0f0 0% 25%, white 0% 50%); /* Šahovska tabla */
    background-size: 20px 20px; /* Smanjena veličina šahovske table */
}

/* Stilovi za dugmiće u Cropper modalu */
.cropper-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.cropper-controls button {
    padding: 10px 20px; /* Veći padding za bolji izgled */
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.cropper-controls button:hover {
    background: #0056b3;
}

/* Stilovi za dugme "Zatvori" */
.close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Stilovi za loading spinner */
.loading-spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 1000;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Stilovi za upload dugme */
.custom-file-upload {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.custom-file-upload:hover {
    background-color: #0056b3;
}

#imageUploader {
    display: none;
}

.is-invalid {
    border-color: #dc3545 !important;
}

/* Responsivni stilovi */
@media (max-width: 600px) {
    .cropper-controls {
        flex-direction: column;
        align-items: center;
    }

    .cropper-controls button {
        width: 100%;
        margin-bottom: 10px;
    }

    .modal-content {
        width: 90%;
        max-width: 400px;
        padding: 10px;
    }

    .modal-content img {
        max-width: 100%;
        max-height: 50vh;
    }
}

/* Stilovi za galeriju */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.gallery-item {
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}
/* Stilovi za prilagođeni modal */
#customConfirmModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#customConfirmModal .modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

#customConfirmModal .modal-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

#customConfirmModal button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

#confirmNo {
    background: #dc3545;
    color: white;
}

#confirmYes {
    background: #28a745;
    color: white;
}
