/* --------------------------------------------------
  Base Style
-------------------------------------------------- */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  color: #333;
  background-color: #f8f9fa;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --------------------------------------------------
  Buttons (Reusable)
-------------------------------------------------- */
.btn {
  padding: 2px 15px;
  font-size: 1.1em;
  font-weight: 500;
  text-decoration: none;
  border-radius: 3px;
  margin: 0 0px;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
}

.btn-primary {
  background-color: #007bff;
  color: white;
  border: 1px solid #007bff;
}

.btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
  border: 1px solid #6c757d;
}

.btn-secondary:hover {
  background-color: #5a6268;
  border-color: #545b62;
  transform: translateY(-2px);
}

.btn-block {
  display: block;
  width: 100%;
}

.button-row {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.btn-logout {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 1em;
  border-radius: 5px;
  cursor: pointer;
}

.btn-logout:hover {
  background-color: #c82333;
  transform: translateY(-2px);
}

/* --------------------------------------------------
  Background Style
-------------------------------------------------- */
.home-background {
  background: url("../images/house-bg.png") no-repeat center center fixed;
  background-size: cover;
}

.auth-background {
  background-color: #eef2f7;
}
.auth-background-register {
  background-color: #f0f4f8;
}

/* --------------------------------------------------
  Header/Navigation
-------------------------------------------------- */
.site-header {
  background-color: #ffffff;
  padding: 10px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
  box-sizing: border-box;
}

.site-logo-img {
  height: 80px;
  width: auto;
  vertical-align: middle;
}

.logo-container a {
  text-decoration: none;
  display: inline-block;
}

.main-nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.main-nav li {
  margin-left: 20px;
}

.main-nav a,
.nav-button {
  text-decoration: none;
  color: #ffffff;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 4px;
}
.nav-button {
  background-color: #007bff;
  color: white;
}

.main-nav a:hover,
.nav-button:hover {
  background-color: #0056b3;
  color: white;
}

/* --------------------------------------------------
  Welcome/Landing Page
-------------------------------------------------- */
.welcome-container {
  text-align: center;
  margin: auto;
  padding: 40px;
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  max-width: 600px;
}

.welcome-container h1 {
  font-size: 2.8em;
  color: #fff;
  margin-bottom: 20px;
}

.welcome-container .tagline {
  font-size: 1.3em;
  color: #e9ecef;
  margin-bottom: 30px;
}

/* --------------------------------------------------
  Action Button
-------------------------------------------------- */
.action-buttons .btn {
  padding: 12px 25px;
  font-size: 1.1em;
  text-decoration: none;
  border-radius: 5px;
  margin: 0 10px;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
}

.action-buttons .btn-primary {
  background-color: #007bff;
  color: white;
  border: 1px solid #007bff;
}

.action-buttons .btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  transform: translateY(-2px);
}

.action-buttons .btn-secondary {
  background-color: #6c757d;
  color: white;
  border: 1px solid #6c757d;
}

.action-buttons .btn-secondary:hover {
  background-color: #5a6268;
  border-color: #545b62;
  transform: translateY(-2px);
}

/* --------------------------------------------------
  Authentication Forms (Login/Register)
-------------------------------------------------- */
.auth-container {
  width: 100%;
  max-width: 400px;
  margin: 60px auto;
  padding: 30px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.register-container {
  max-width: 450px;
}

.auth-container h2 {
  text-align: center;
  margin-bottom: 25px;
  color: #333;
  font-size: 1.8em;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 1em;
}

.form-control:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.auth-container .btn {
  padding: 10px 15px;
  font-size: 1.1em;
  font-weight: 500;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.auth-container .btn-primary {
  background-color: #007bff;
  color: white;
  border: none;
}

.auth-container .btn-primary:hover {
  background-color: #0056b3;
}

.auth-container .btn-success {
  background-color: #28a745;
  color: white;
  border: none;
}

.auth-container .btn-success:hover {
  background-color: #1e7e34;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 0.95em;
}

.auth-switch a {
  color: #007bff;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------
  Alerts/Notifications
-------------------------------------------------- */
.alert {
  padding: 10px 15px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 0.95em;
}

.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

/* --------------------------------------------------
  Profile Page
-------------------------------------------------- */
.profile-container {
  width: 100%;
  max-width: 400px;
  margin: 30px auto;
  padding: 30px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.profile-container h1 {
  text-align: center;
  margin-bottom: 15px;
  color: #333;
  font-size: 1.8em;
}

.user-detail-container p {
  margin: 4px 0;
}

.profile-container .btn-primary {
  margin-top: 20px;
  gap: 10px;
}

.profile-container .button-row button {
  flex: 1;
}

/* --------------------------------------------------
  Dashboard Page
-------------------------------------------------- */
.dashboard-container {
  width: 100%;
  max-width: 400px;
  margin: 30px auto;
  padding: 30px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.dashboard-container h1 {
  text-align: center;
  margin-bottom: 1px;
  color: #333;
  font-size: 1.8em;
}

.dashboard-container p {
  text-align: center;
  margin-bottom: 1px;
  color: #abb2b9;
  font-size: 1em;
}

.dashboard-link {
  color: #007bff !important;
  text-decoration: none;
}

.dashboard-link:hover {
  text-decoration: underline;
}

.logout-container {
  margin: 10px auto;
  text-align: center;
}

/* --------------------------------------------------
  Property Detail Page
-------------------------------------------------- */
.property-detail-container {
  width: 100%;
  max-width: 600px;
  margin: 30px auto;
  padding: 30px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.property-detail-table {
  width: 50%;
  border-collapse: collapse;
}

.property-detail-table th {
  text-align: left;
  font-weight: 700;
}

.property-detail-table td {
  text-align: left;
}

.property-images {
  width: 300px;
  height: auto;
}

.title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.message-input-box {
  width: 90%;
  height: 100px;
  margin-bottom: 15px;
  font-size: 14px;
  resize: vertical;
  box-sizing: border-box;
}

.send-message-btn {
  padding: 2px 15px;
  font-size: 1.1em;
  font-weight: 500;
  text-decoration: none;
  border-radius: 3px;
  margin: 0 0px;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
  background-color: #007bff;
  color: white;
  border: 1px solid #007bff;
}

.send-message-btn:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  transform: translateY(-2px);
}

.image-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000cc;
  z-index: 1000;
  text-align: center;
  padding-top: 60px;
  user-select: none;
}

.overlay-image {
  max-width: 80%;
  max-height: 80%;
}

.close {
  position: absolute;
  top: 10px;
  right: 50px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

.prev,
.next {
  position: absolute;
  top: 50%;
  font-size: 40px;
  color: white;
  padding: 16px;
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;
}

.prev {
  left: 30px;
}

.next {
  right: 30px;
}

/* --------------------------------------------------
  Browse Properties Page
-------------------------------------------------- */
.browse-properties-container {
  width: 90%;
  margin: 0 auto;
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 4px;
  font-weight: bold;
  font-size: 14px;
}

.form-group input,
.form-group select {
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.button-group {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-direction: row;
  margin: 20px 0;
}

.property-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.property-card {
  width: 100%;
  margin: 0 auto;
  display: flex;
  background: #fff;
  border-radius: 10px;
  padding: 15px;
}

.property-image img {
  width: 250px;
  height: auto;
  object-fit: cover;
  border-radius: 5px;
}

.property-info {
  margin-left: 20px;
  flex-grow: 1;
}

.property-info h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 18px;
}

.filter-btn {
  padding: 5px 15px;
  font-size: 1.1em;
  font-weight: 300;
  text-decoration: none;
  border-radius: 3px;
  margin: 0 0px;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
  display: inline-block;
  text-align: center;
  line-height: normal;
}

.filter-btn-primary {
  background-color: #007bff;
  color: white;
  border: 1px solid #007bff;
}

.filter-btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  transform: translateY(-2px);
}

.filter-btn-secondary {
  background-color: #6c757d;
  color: white;
  border: 1px solid #6c757d;
}

.filter-btn-secondary:hover {
  background-color: #5a6268;
  border-color: #545b62;
  transform: translateY(-2px);
}

/* --------------------------------------------------
  Manage Properties Page (Styled to match Browse)
-------------------------------------------------- */

.browse-properties-container {
  width: 90%;
  margin: 20px auto;
}

.property-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 20px 0;
}

.property-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  width: 100%;
}

.property-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.property-image img {
  width: 250px;
  height: auto;
  object-fit: cover;
  border-radius: 5px;
}

.property-info {
  flex: 1;
  margin-left: 20px;
}

.property-info h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 18px;
  color: #16b5e0;
}

.property-info p {
  margin: 5px 0;
  font-size: 1em;
}

.button-group {
  margin-top: 15px;
}

.filter-btn {
  padding: 6px 15px;
  font-size: 1em;
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  display: inline-block;
  text-align: center;
  border: 1px solid transparent;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
}

.filter-btn-primary {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.filter-btn-primary:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}

/* --------------------------------------------------
  Footer
-------------------------------------------------- */
.site-footer {
  background-color: #343a40;
  color: #f8f9fa;
  text-align: center;
  padding: 15px 0;
  margin-top: auto;
  width: 100%;
}

/* --------------------------------------------------
  Misc
-------------------------------------------------- */
.app-version {
  margin-top: 30px;
  font-size: 0.9em;
  color: #adb5bd;
}

/*---------------------------------------------------
View Messages
-----------------------------------------------------*/
body {
  background-color: #f4f4f4;
  margin: 0;
  padding: 60px 40px;
}

.container {
  max-width: 1000px;
  margin: 80px auto;
  background: white;
  padding: 50px 50px 40px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h2 {
  text-align: center;
  margin-bottom: 40px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.table th,
.table td {
  border: 1px solid #ccc;
  padding: 14px 18px;
  text-align: center;
}

.table th {
  background-color: #f7f7f7;
}

.btn {
  padding: 6px 14px;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-weight: bold;
}

.btn-primary {
  background-color: #007bff;
  margin-right: 6px;
}

.btn-primary:hover {
  background-color: #0069d9;
}

.btn-danger {
  background-color: #dc3545;
}

.btn-danger:hover {
  background-color: #c82333;
}

.back-link {
  display: block;
  text-align: center;
  margin-top: 30px;
}

.back-link a {
  color: #007bff;
  font-weight: bold;
  text-decoration: none;
}

.back-link a:hover {
  text-decoration: underline;
}

.btn-success {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.btn-success:hover {
  background-color: #218838;
}

/* --------------------------------------------------
  Table Styling (Buyer Messaging Table Only)
-------------------------------------------------- */
.buyer-messages-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.buyer-messages-table th,
.buyer-messages-table td {
  padding: 12px 15px;
  border: 1px solid #ddd;
  text-align: left;
}

.buyer-messages-table th {
  background-color: #007bff;
  color: #fff;
}

.buyer-messages-table tr:nth-child(even) {
  background-color: #f2f2f2;
}

.buyer-messages-table tr:hover {
  background-color: #f1f1f1;
}

/* --------------------------------------------------
  Admin User List Table Styling
-------------------------------------------------- */
.admin-user-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.admin-user-table th,
.admin-user-table td {
  padding: 12px 15px;
  border: 1px solid #ddd;
  text-align: center;
}

.admin-user-table th {
  background-color: #28a745;
  color: #fff;
}

.admin-user-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.admin-user-table tr:hover {
  background-color: #f1f1f1;
}

/* --------------------------------------------------
  Buyer All Message Page
-------------------------------------------------- */
.message-detail-container {
  width: 80%;
  margin: 30px auto;
  padding: 30px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* --------------------------------------------------
  Property Image Management (Edit Property Page)
-------------------------------------------------- */
.image-management-container {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.image-management-container h3,
.image-management-container h4 {
  margin-bottom: 15px;
  color: #333;
}

.current-images {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.current-images .img-container {
  position: relative;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  width: 166px;
  height: 116px;
  box-sizing: border-box;
}

.current-images .img-container img {
  width: 150px;
  height: 100px;
  object-fit: cover;
  display: block;
  border-radius: 3px;
}

.current-images .remove-img-btn {
  position: absolute;
  top: 0px;
  right: 0px;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 0 4px 0 4px;
  width: 24px;
  height: 24px;
  font-size: 14px;
  font-weight: bold;
  line-height: 24px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.current-images .remove-img-btn:hover {
  background-color: #c82333;
}

.add-image-form {
  margin-top: 20px;
  padding: 15px;
  background-color: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 4px;
}

.add-image-form .form-control-file {
  display: block;
  margin-bottom: 10px;
}
