/* === Temple CRM – Frontend Style === */
.temple-popup-overlay {
    position: fixed;
    top: -3rem;
    left: 0;
    width: 100vw;
    height: 104vh;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(8px); /* zabluraj pozadinu */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.temple-popup {
    background: #fff;
    width: 60%;
    max-width: 900px;
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.temple-popup .close-popup {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.temple-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.temple-arrow {
    background-color: #3f886b;
    color: #fff;
    border: none;
    font-size: 20px;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 1;
    margin: 0 0 0 5px;
}
.temple-arrow:hover {
    background-color: #2e6e57;
}

.temple-calendar table {
    width: 100%;
    border-collapse: collapse;
}

.temple-calendar th,
.temple-calendar td {
    padding: 10px;
    text-align: center;
    border: 1px solid #ccc;
}

.temple-date-cell.disabled {
    background-color: #eee;
    color: #aaa;
    cursor: not-allowed;
}

.temple-date-cell.selected {
    background-color: #3f886b;
    color: white;
    font-weight: bold;
}

.temple-timeslot-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.temple-slot-button {
    background-color: #f3f3f3;
    color: #333;
    border: 1px solid #ccc;
    padding: 8px 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.temple-slot-button:hover {
    background-color: #3f886b;
    color: #fff;
}

.temple-slot-button.selected {
    background-color: #3f886b;
    color: white;
    font-weight: bold;
}

.temple-slot-button.taken {
    background-color: #bbb;
    color: #fff;
    cursor: not-allowed;
}

.temple-slot-button.pause {
    background-color: #ffa500;
    color: white;
    cursor: not-allowed;
}

.temple-booking-form {
    margin-top: 20px;
}

.temple-booking-form h2 {
    margin-top: 4rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: bold;
}

.temple-booking-form input,
.temple-booking-form select {
    width: 100%;
    margin-top:0;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.confirm-button {
    background-color: #3f886b;
    color: white;
    padding: 12px;
    width: 100%;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.confirm-button:hover {
    background-color: #2e6e57;
}

.temple-btn {
    background-color: #3f886b;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    margin: 10px auto;
    display: block;
}
.temple-btn:hover {
    background-color: #2e6e57;
}

/* Uniformne dugmadi za termine */
.temple-timeslot-buttons button {
    background-color: #f3f3f3;
    color: #333;
    border: 1px solid #ccc;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.temple-timeslot-buttons button:hover {
    background-color: #3f886b;
    color: white;
}

.temple-timeslot-buttons button.selected {
    background-color: #3f886b;
    color: white;
    font-weight: bold;
}

.temple-timeslot-buttons button.taken {
    background-color: #999;
    color: white;
    cursor: not-allowed;
}

.temple-timeslot-buttons button.pause {
    background-color: #ffa500;
    color: white;
    cursor: not-allowed;
}

.temple-date-cell {
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.temple-date-cell:hover {
    background-color: #e3f5ee;
    color: #2e6e57;
    font-weight: bold;
}

.temple-date-cell.disabled {
    cursor: not-allowed;
    background-color: #f2f2f2;
    color: #aaa;
}

.temple-date-cell.disabled:hover {
    background-color: #f2f2f2;
    color: #aaa;
    font-weight: normal;
}



/* Animacija za fade-in i fade-out */
@keyframes fadeInPopup {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOutPopup {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Kada se prikazuje */
.temple-popup.show {
    animation: fadeInPopup 0.3s ease forwards;
}

/* Kada se zatvara */
.temple-popup.hide {
    animation: fadeOutPopup 0.2s ease forwards;
}

/* Preko overlay fade */
.temple-popup-overlay.show {
    display: flex;
    animation: fadeInPopup 0.3s ease forwards;
}

.temple-popup-overlay.hide {
    animation: fadeOutPopup 0.2s ease forwards;
}

.temple-close {
    position: absolute;
    top: 5px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    background: transparent;
    color: #3f886b;
    border: none;
    cursor: pointer;
    z-index: 9999;
    padding: 0;
    line-height: 1;
    transition: all 0.2s ease;
}

.temple-close:hover {
    color: #2e6e57;
    transform: scale(1.2);
}


@media screen and (max-width: 768px) {
    .temple-popup {
        width: 90%;
        padding: 20px;
    }

    .temple-popup h2 {
        font-size: 20px;
    }

    .temple-timeslot-buttons {
        flex-direction: column;
    }
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
    .temple-timeslot-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .temple-timeslot-buttons button {
        width: 100%;
        font-size: 16px;
    }
}

.temple-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #3f886b;
    color: white;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10000;
}
.temple-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Kada se popup otvori, header nestaje / zamagli se */
body.popup-active .site-header {
    backdrop-filter: blur(60rem);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

