/* 1. GLOBAL STYLES*/
html,
body {
	height: 100%;
}

body {
	font-family: "Poppins", sans-serif;
	background-color: #ffffff;
	color: #333;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* Kerapian Elemen Tombol Umum */
.btn {
	font-weight: 600;
	transition:
		transform 0.2s ease,
		background-color 0.2s ease,
		border-color 0.2s ease;
}

.btn:active {
	transform: scale(0.95);
}

/* Elemen Utama Button Primary */
.btn-primary {
	background-color: #0d6efd;
	border: none;
}

.btn-primary:hover {
	background-color: #0b5ed7;
}

/* 2. NAVIGATION, NAVBAR & DROPDOWN STYLES */
.nav-link {
	font-weight: 500;
	color: #555 !important;
	transition: color 0.3s ease;
}

.nav-link:hover {
	color: #0d6efd !important;
}

/* Struktur Profil Pengguna Kecil di Navbar */
.img-profile {
	border: 1px solid #dee2e6;
	padding: 1px;
}

/* Penataan Menu Dropdown Akun */
.dropdown-menu {
	min-width: 160px;
	animation: dropdownFadeIn 0.2s ease-out;
}

.dropdown-item {
	font-size: 0.9rem;
	color: #4e73df;
	transition: all 0.2s ease;
}

.dropdown-item:hover {
	background-color: #f8f9fa;
	color: #0d6efd;
}

@keyframes dropdownFadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* 3. RESPONSIVE HERO SECTION (LANDING PAGE) */
.view-hero-section {
	min-height: calc(
		100vh - 70px
	); /* Memotong tinggi navbar agar pas satu halaman */
}

.hero-illustration {
	width: 100%;
	max-height: 280px;
	object-fit: contain;
	transition: max-height 0.3s ease;
}

/* Penyesuaian Tinggi Gambar Ilustrasi Berdasarkan Layar Gawai */
@media (min-width: 768px) {
	.hero-illustration {
		max-height: 380px;
	}
}

@media (min-width: 992px) {
	.hero-illustration {
		max-height: 450px;
	}
}

/* 4. FORM UTAMA (LOGIN & REGISTRASI) + EFEK INPUT GROUP */
.card-register {
	border-radius: 20px !important;
	animation: scaleIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes scaleIn {
	from {
		transform: scale(0.95);
		opacity: 0;
	}
	to {
		transform: scale(1);
		opacity: 1;
	}
}

/* Desain Komponen Sisi Input Group (Clean Look) */
.input-group-text,
.input-group .form-control,
.input-group .btn-white {
	border-color: #dee2e6;
	transition: all 0.2s ease;
}

.input-group .btn-white {
	background-color: #fff;
}

/* Mengisolasi Kotak Input default shadow */
.input-group .form-control:focus {
	box-shadow: none !important;
	border-color: #dee2e6 !important;
}

/* Efek Focus Bersama Berwarna Biru Lembut */
.input-group:focus-within .input-group-text,
.input-group:focus-within .form-control,
.input-group:focus-within .btn-white {
	border-color: #86b7fe !important;
}

/* Tambahan Clip-Path untuk merapikan Focus-Ring outline Bootstrap 5 */
.input-group:focus-within .input-group-text {
	box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
	clip-path: inset(-10px 0px -10px -10px);
}

.input-group:focus-within .form-control {
	box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
	clip-path: inset(-10px 0px -10px 0px);
}

.input-group:focus-within .btn-white {
	box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
	clip-path: inset(-10px -10px -10px 0px);
	position: relative;
	z-index: 5 !important; /* Mencegah tombol tertutup widget lain di layar sentuh */
}

/* Interaksi Kursor di Atas Tombol Mata */
.input-group .btn-white:hover {
	background-color: #f8f9fa;
}

.input-group .btn-white:hover #eyeIcon {
	color: #0d6efd !important;
}

/* 5. FLOATING CHAT BUTTON (TANYA KAMI) */
.floating-chat-btn {
	position: fixed;
	z-index: 1040;
	background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
	color: #ffffff !important;
	text-decoration: none;
	display: flex;
	align-items: center;
	padding: 12px;
	border-radius: 50px;
	transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);

	/* POSISI DEFAULT: Laptop & PC Layar Lebar */
	top: 95px;
	right: 25px;
	bottom: auto;
}

.chat-icon-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.4rem;
	width: 28px;
	height: 28px;
}

/* Menyembunyikan Teks "Tanya Kami" secara default */
.chat-text-hover {
	max-width: 0;
	overflow: hidden;
	white-space: nowrap;
	font-weight: 600;
	font-size: 0.9rem;
	transition:
		max-width 0.3s ease,
		margin-left 0.3s ease;
	margin-left: 0;
}

/* Efek Melebar & Naik Saat Hover */
.floating-chat-btn:hover {
	transform: translateY(-3px) scale(1.02);
	box-shadow: 0 1rem 3rem rgba(13, 110, 253, 0.35) !important;
	padding-left: 18px;
	padding-right: 18px;
}

.floating-chat-btn:hover .chat-text-hover {
	max-width: 120px;
	margin-left: 10px;
}

/* --- ATURAN MEDIA QUERY UTAMA: IPAD MINI, TABLET, DAN SMARTPHONE --- */
@media (max-width: 991.98px) {
	.floating-chat-btn {
		top: auto; /* Mematikan top agar tidak mengganggu Dropdown Menu Navbar */
		bottom: 30px; /* Dipindahkan dengan aman ke sudut kanan bawah viewport */
		right: 25px;
		box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
	}
	.navbar-collapse {
		overflow: visible !important;
	}

	/* Mengubah posisi melayang menjadi statis/relatif agar mendorong menu ke bawah secara rapi */
	.navbar-nav .dropdown-menu {
		position: static !important;
		float: none;
		background-color: #f8f9fa; /* Memberi warna background abu-abu soft membedakan dengan menu utama */
		box-shadow: none !important; /* Menghilangkan shadow tebal di mobile agar bersih */
		border-left: 3px solid #0d6efd !important; /* Aksen garis biru tanda sub-menu */
		margin-top: 8px;
		margin-bottom: 8px;
		padding-left: 15px; /* Memberi space menjorok ke dalam */
	}

	/* Menyesuaikan warna teks link dropdown di mobile agar serasi */
	.navbar-nav .dropdown-item {
		color: #555 !important;
		padding-top: 10px !important;
		padding-bottom: 10px !important;
	}

	/* Merapikan letak kontainer avatar agar berada di sisi kiri layout list menu mobile */
	.navbar-collapse .ms-auto {
		margin-left: 0 !important;
		padding-top: 15px;
		padding-bottom: 10px;
		border-top: 1px solid #eee; /* Garis pembatas tipis di atas profil */
		margin-top: 10px;
	}
}

/* 6. ELEMEN BALON OBROLAN (CHAT PLATFORM MODULE) */
.bg-light-chat {
	background-color: #f4f6f9;
	background-image:
		radial-gradient(#dee2e6 0.6px, transparent 0.6px),
		radial-gradient(#dee2e6 0.6px, #f4f6f9 0.6px);
	background-size: 20px 20px;
	background-position:
		0 0,
		10px 10px;
}

/* Balon Chat Kanan (Sisi User) */
.chat-bubble-right {
	background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
	color: #ffffff;
	max-width: 70%;
	padding: 10px 16px;
	border-radius: 16px 16px 2px 16px;
	word-wrap: break-word;
}

/* Balon Chat Kiri (Sisi Mentor) */
.chat-bubble-left {
	background-color: #ffffff;
	color: #212529;
	max-width: 70%;
	padding: 10px 16px;
	border-radius: 16px 16px 16px 2px;
	border: 1px solid #e3e6f0;
	word-wrap: break-word;
}

.chat-message-text {
	font-size: 0.92rem;
	line-height: 1.45;
	white-space: pre-line;
}

.chat-time-meta {
	font-size: 10px;
	font-weight: 500;
}

/* 7. TITIK NOTIFIKASI (RED PULSE DOT) */
.chat-notification-dot {
	position: absolute;
	top: -2px;
	right: -2px;
	width: 12px;
	height: 12px;
	background-color: #dc3545;
	border: 2px solid #0d6efd;
	border-radius: 50%;
	display: block;
	z-index: 5;
	animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
	0% {
		box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
	}
	70% {
		box-shadow: 0 0 0 6px rgba(220, 53, 69, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
	}
}
