/* 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;
}

.vertical-spot { width: 30%; height: 90%; }
.small-square { width: 95px; height: 95px; }
.large-spot { width: 45%; height: 90%; }
.horizontal-spot { width: 90%; height: 80%; }

.small-vertical-spot {
    width: 100%;
    height: 50%; /* Visina pojedinačnog pravougaonika */
    border: 1px dashed #ccc;
    background-color: #fff;
    position: relative;
}
.small-horizontal {
    width: 100%;
    height: 48%; /* Visina pojedinačnog pravougaonika */
    border: 1px dashed #ccc;
    background-color: #fff;
    position: relative;
}
.left-column {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Vertikalno raspoređivanje */
    height: 100%;
    width: 48%; /* Širina kolone */
}
.right-column {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Vertikalno raspoređivanje */
    height: 100%;
    width: 48%; /* Širina kolone */
}
.top-right-section {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 48%; /* Takes about half of the right column */
    width: 100%;
}

.bottom-right-section {
    height: 48%; /* Takes about half of the right column */
    width: 100%;
}
.small-vertical {
    width: 100%;
    height: 100%; /* Each vertical spot takes nearly half of top section */
    border: 1px dashed #666;
    background-color: white;
    position: relative;
}

.large-horizontal {
    width: 100%;
    height: 100%; /* Fills the entire bottom section */
    border: 1px dashed #666;
    background-color: white;
    position: relative;
}


/* Stilovi za cropper modal */
.cropperModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
}

.crop-controls {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 10px;
}

.close {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
}
.crop-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 10;
    border-radius: 5px;
}

/* 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;
}




.photo-spot {
    position: relative;
}

.spot-number {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;
}

.photo-spot:not(:has(img)) {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    color: #666;
    border: 2px dashed #ccc;
    cursor: pointer;
}

.photo-spot:not(:has(img)):hover {
    border-color: #999;
    background-color: #f5f5f5;
}
/* Improved touch targets */
.photo-spot {
    min-height: 100px;
    touch-action: manipulation; /* Improve touch responsiveness */
    user-select: none; /* Prevent text selection on touch */
    cursor: pointer;
}

/* Better mobile visual feedback */
.photo-spot:active {
    background-color: #f0f0f0;
    transform: scale(0.98);
}

/* Multi-line instruction text */
.photo-spot:not(:has(img)) {
    white-space: pre-line;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
}
/* Stilovi za prilagođeni modal za upitnik da ne*/
#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;
}
