/* header */
.navbar-nav .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 5px 10px;
}

.nav-link {
    color: white;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link.active {
    font-weight: bold;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 5px 10px;
}

/* footer */
.footer-wrapper a {
    color: white;
    text-decoration: none;
}
.footer-wrapper a:hover {
    text-decoration: underline;
}

/* icon simko */
.navbar-brand {
    color: white;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.navbar-brand:hover {
    background-color: transparent;
    color: #dad8d8; 
    transform: translateY(-5px); 
}

/* button style */
.btn-primary {
    color: #fff; 
    background-color: #2a9df4;
    border-color: #2a9df4;
    transition: all 0.3s ease; 
    border-radius: 8px;
}

.btn-primary:hover {
    color: #0d6efd;
    border-color: #0d6efd; 
    background-color: transparent;
    border-radius: 8px;
}
.btn-save {
    color: #ffffff;
    background-color: #2a9df4;
    transition: all 0.3s ease; 
    padding: 10px 20px;
    border-radius: 8px;
}
.btn-save:hover {
    color: #ffffff;
    background-color: #017fdf;
}

.btn-outline {
    color: #1c1e22; 
    border-color: #1c1e22;
    border-radius: 8px;
    transition: all 0.3s ease;
  }
  
.btn-outline:hover {
    background-color: transparent;
    border-color: #007bff; 
    color: #0d6efd;
    border-radius: 8px;
}
  
.btn-cancel {
    color: #fff; 
    background-color: #dc3545; /* Merah */
    border-color: #dc3545;
    transition: all 0.3s ease; 
    border-radius: 8px;
}

.btn-cancel:hover {
    color: #dc3545; /* Warna teks merah saat hover */
    background-color: transparent; 
    border-color: #dc3545;
    border-radius: 8px;
}
.custom-back {
    color: #0d6efd; 
    background-color: #ffffff;
    border-color: #0d6efd;
    transition: all 0.3s ease; 
    border-radius: 8px;
}

.custom-back:hover {
    color: #fff;
    border-color: #2a9df4; 
    background-color: transparent;
    border-radius: 8px;
}

.btn-back {
    background-color: #6c757d; 
    color: #ffffff; 
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    color: #ffffff;
    background-color: #444a50; 
}

.btn-danger {
    color: #fff; 
    background-color: #dc3545;
    transition: all 0.3s ease; 
    border-radius: 8px;
    padding: 8px 12px;
}

.btn-danger:hover {
    color: #fff;
    border-radius: 8px;
}

.btn-warning {
    color: #000000; 
    background-color: #ffcf10;
    transition: all 0.3s ease; 
    border-radius: 8px;
    padding: 8px 12px;
}

.btn-warning:hover {
    color: #000000; 
    background-color: #e2b502;
    border-radius: 8px;
}

.btn-custom:read-only{
    background-color: #2a9df4;
    border-color: #0d6efd;
    color: #fff; 
    pointer-events: none; 
    cursor: default;
}

.text-decoration-none {
    text-decoration: none;
    color: inherit;
}

.text-decoration-none:hover {
    color: inherit; 
}

.carousel-image {
    height: 450px;
    width: 100%;
    filter: brightness(85%);
    border-radius: 15px;
}

.carousel-inner {
    border-radius: 15px;
}

#carouselAds {
    margin-top: 130px;
    margin-bottom: 60px;
    border-radius: 15px;
    width: auto;
    height: auto;
    padding: 0px 15px 0px 15px;
    border-radius: 15px;
}

/* Membuat teks hanya muncul saat hover */
.carousel-item .carousel-caption {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* Saat hover di carousel, tampilkan teks */
#carouselAds:hover .carousel-caption {
    opacity: 1;
}

/* button custom tipe kamar */
.btn-kost {
    border-radius: 10px; 
    background-color: #6c63ff; 
    color: white;
    cursor: default;
    pointer-events: none;
}

/* Button custom untuk menampilkan sisa kamar */
.btn-available {
    background-color: #28a745; /* Warna hijau */
    color: white; /* Warna teks putih */
    border-radius: 8px; /* Sudut membulat */
    padding: 8px 12px; /* Padding agar nyaman diklik */
    font-weight: medium; /* Tebal teks medium */
    font-size: 1rem; /* Ukuran font */
    transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out;
    animation: pulse 1.5s infinite;
}

/* Efek hover */
.btn-available:hover {
    background-color: #218838; /* Hijau lebih gelap saat hover */
    color: white;
    cursor: default;
}

/* Efek animasi berkedip */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* button custom sisa kamar */
.btn-leftover {
    background-color: #dc3545;
    color: white;
    border-radius: 8px;
    padding: 8px 12px;
    font-weight: medium;
    transition: background-color 0.3s ease-in-out;
    animation: pulse 1.5s infinite;
    font-size: 1rem;
}

.btn-leftover:hover {
    background-color: #b02a37;
    color: white;
    cursor: default;
}


@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.form-control {
    border-radius: 10px;
    border: 1px solid #ced4da;
}
.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* Swal Notification */
.swalnotif{
    margin-top: 87px;
}

/* register view */
.login-option:hover {
    background: #e3f2fd;
    transform: scale(1.02);
    transition: 0.3s;
}

/* card-body profile */
/* form update profile */
.transition-card {
    transition: all 0.3s ease-in-out;
}
.transition-btn {
    transition: background-color 0.3s, transform 0.2s;
}
.transition-btn:hover {
    transform: scale(1.05);
}

.show-form {
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.2) !important;
}

/* Highlight input yang diubah */
.input-changed {
    border-color: #28a745 !important;
    box-shadow: 0px 0px 5px rgba(40, 167, 69, 0.5) !important;
}

/* Disabled button lebih terlihat */
#saveButton:disabled {
    background-color: #b5b5b5;
    cursor: not-allowed;
}

/* ownerpage  */
.navbar {
    z-index: 1030;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #2a9df4;
    padding-top: 1rem;
}

/* Sidebar */
.sidebar {
    width: 250px;
    position: fixed;
    top: 56px;
    left: 0;
    height: calc(100vh - 56px);
    background-color: #3a444b; 
    padding: 1rem;
    transition: transform 0.3s ease-in-out;
    z-index: 1050; 
}

/* Sidebar Link */
.sidebar-link {
    display: flex;
    align-items: center;
    color: white;
    white-space: nowrap; 
    text-decoration: none;
    padding: 20px;
    padding-bottom: 20px;
    border-radius: 5px;
    transition: background 0.3s;
    background: none;
    border: none;
}

.sidebar-item {
    display: flex;
    align-items: center;
    color: white;
    white-space: nowrap; 
    text-decoration: none;
    padding: 20px;
    padding-bottom: 20px;
    border-radius: 5px;
    transition: background 0.3s;
    margin-left: -2px;
}

.sidebar-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
}
.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.main-container {
    margin-top: 70px;
    margin-left: 270px;
    margin-right: 15px;
    position: relative;
    z-index: 1000; 
}

/* Image upload ownerpage (edit kost)*/
.custom-image-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.custom-image-container img {
    width: 100%;
    display: block;
    transition: filter 0.3s ease-in-out;
}

.custom-preview-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    transition: 0.3s;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, background 0.3s ease-in-out;
    gap: 5px;   
}
.custom-image-container:hover .image-overlay {
    background: rgba(0, 0, 0, 0.5); 
    opacity: 1;
}
.custom-image-container:hover img {
    filter: blur(3px); 
}

.image-overlay .btn {
    margin: 5px;
    transition: transform 0.2s ease-in-out;
}

.image-overlay .btn:hover {
    transform: scale(1.1);
}

.btn-preview{
    color: #fff; 
    background-color: #2a9df4;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.btn-preview:hover {
    color: #ffffff;
    background-color: #017fdf;
}   

/* Baru */
.preview-box .delete-btn {
    position: absolute;
    background: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 3px 8px; 
    border-radius: 8px; 
    font-size: 14px; 
    cursor: pointer;
    transition: background 0.3s ease;
}

.preview-box .delete-btn:hover {
    background: rgba(255, 0, 0, 1); 
}

.preview-box {
    position: relative;
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: 0.3s ease-in-out;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: rgba(0,0,0,0.4);
    color: white;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.3s ease-in-out;
}

.preview-box:hover .preview-overlay {
    opacity: 1;
}

/* Image upload adminpage/ trigger error image di create & manage kost */ 
.img-preview {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    transition: 0.3s;
}

/* Image upload ownerpage (create & manage kost)*/
.image-upload {
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: left;
}

.upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px dashed #007bff;
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
    background-color: #f1f1f1;
    width: 500px;
    height: 320px;
    position: relative;
}

.upload-box:hover {
    background-color: #e9f5ff;
    border-color: #0056b3;
}

.preview-container {
    display: none; 
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    overflow: hidden;
    border-radius: 8px;
    background-color: #fff;
    border: 2px solid #007bff;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease-in-out;
}

.upload-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.3s ease-in-out;
}

.upload-box label {
    cursor: pointer;
    padding: 12px 20px;
    border-radius: 8px;
    background-color: #007bff;
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}

.upload-box label:hover {
    background-color: #0056b3;
}

/* Action buttons for preview */
.preview-container .action-btns {
    position: absolute;
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.preview-container:hover img {
    filter: blur(5px);
}

.preview-container:hover .action-btns {
    opacity: 1;
}

.preview-container .action-btns button {
    padding: 8px 15px;
    border-radius: 5px;
    border: none;
    background-color: #007bff;
    color: white;
    cursor: pointer;
}

.preview-container .action-btns button:hover {
    background-color: #0056b3;
}

/* ukuran modal  */
.modal-body {
    max-height: 80vh;
    overflow-y: auto; 
}

.modal-dialog {
    max-width: 600px;
}

/* .modal-backdrop{
    display: none !important;
} */

body.swal2-shown {
    overflow-y: auto !important;
    padding-right: 0 !important;
  } 

body.modal-open {
    padding-right: 0 !important;
    overflow: auto !important;
}

/* styling image */
.img-home{
    width: 100%;
    min-height: 250px;
    object-fit: cover;
}
.lb-image {
    width: 50vw !important; 
    height: 80vh !important; 
    object-fit: contain;
}

/* Menyesuaikan ukuran gambar utama */
.main-image {
    width: 100%;
    height: 500px; 
    object-fit: cover; 
    border-radius: 8px;
}

/* Menyesuaikan ukuran thumbnail */
.thumb-img {
    width: 100%;
    height: 138px; 
    object-fit: cover;
    border-radius: 0.375rem;
}

/* Mengatur layout thumbnail agar sejajar */
.thumb-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.thumb-container .col-6 {
    flex: 1 1 calc(50% - 8px); /* Membagi 2 kolom */
    max-width: 50%;
}
.thumbnail-wrapper {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 0.375rem;
}
.bg-success {
    background: linear-gradient(135deg, #28a745, #218838);
    font-weight: light;
}
.bg-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
}
.bg-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
}
.bg-warning {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #343a40;
}

/* styling testimoni */
.testimoni-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 10px;
    scroll-behavior: smooth;
}

.testimoni-card {
    flex-shrink: 0;
    scroll-snap-align: start;
    background-color: #fff;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
    transition: transform 0.3s ease;
}

.testimoni-card:hover {
    transform: translateY(-5px);
}

.testimoni-card .message-container {
    min-height: 100px; 
    max-width: 240px; 
    width: 225px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.star-rating {
    display: flex;
    justify-content: space-between;
    width: 100%;
    flex-direction: row-reverse; 
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating label {
    font-size: 2rem;
    color: #ccc;
    cursor: pointer;
}

.star-rating input[type="radio"]:checked ~ label {
    color: #2a9df4;
}

.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #2a9df4;
}

.rating-container {
    justify-content: flex-start; 
}

.rating-left {
    justify-content: flex-start; 
}


/* styling responsive */
@media (max-width: 576px) {
    .btn-warning, .btn-outline-success {
        width: 100%;
        font-size: 0.9rem;
        padding: 10px;
        text-align: center;
    }
    .d-flex {
        flex-direction: column;
        gap: 10px;
    } 

    .profile-card {
        margin-top: 50px;
    }
    .carousel-image {
        height: 100px;
        width: 100%;
        border-radius: 15px;
    }
}

@media (max-width: 400px) {
    .rating-container {
        justify-content: flex-start; 
        flex-direction: row; 
        gap: 0.5rem; 
    }
    .rating-left {
        justify-content: flex-start; 
        flex-direction: row; 
        gap: 0.5rem; 
    }
    .main-card{
        padding: 0 28px 0 28px;
    }
    .dashboard-card{
        padding: 0 28px 0 28px;
        margin-left: 8px;
    }
    .carousel-control-prev{
        left: 20px;
    }
    .carousel-control-next{
        right: 20px;
    }
    .lb-image {
        width: 80vw !important; 
        height: 80vh !important; 
        object-fit: contain;
    }
    .desc-custom {
        white-space: nowrap; 
        overflow: hidden;    
        text-overflow: ellipsis; 
    }

}

@media (max-width: 768px) {
    .carousel-image {
        height: 220px; 
      }
      .carousel-caption {
        font-size: 0.85rem;
      }

    }

/* sesuaikan content ketika sidebar hide */
@media (max-width: 992px) {
    .main-container {
        margin-left: 0;
    }
    .sidebar {
        transform: translateX(-250px);
    }

    .sidebar.show {
        transform: translateX(0);
    }
    .carousel-image {
        height: 350px;
        width: 100%;
        border-radius: 15px;
    }

}
