/* global.css */

html, body, #root {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

#root {
  display: flex;         /* ✅ RN-web layout fix */
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}


/* ---------- INPUT / PASSWORD ---------- */

input:focus {
  outline: none !important;
  border-radius: 4px; /* Optional: Adds rounded corners */
}

/* Hide default password reveal icon in Microsoft browsers (Edge/IE) */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}

/* Hide default password reveal icon in WebKit browsers (Chrome, Safari, Opera) */
input[type="password"]::-webkit-textfield-decoration-container {
  display: none;
}

/* For additional safety, remove appearance */
input[type="password"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* ---------- FILE INPUT BUTTON ---------- */

.file-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px; /* Space between label and button */
}

.custom-file-label {
  background-color: #007bff; /* Blue button */
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  font-family: "Arial", sans-serif;
  cursor: pointer;
  transition: 0.3s ease-in-out;
  display: inline-block;
  border: 2px solid transparent;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.custom-file-label:hover {
  background-color: #0056b3; /* Darker blue on hover */
  border: 2px solid #004085;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
  transform: scale(1.05);
}

/* Hide the default file input */
.file-input {
  display: none;
}

/* ---------- DATE PICKER ---------- */

.date-picker-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
}

.react-datepicker {
  font-family: inherit;
  border-radius: 8px;
  border-color: #ccc;
}

.react-datepicker__header {
  background-color: #f9f9f9;
  border-bottom: 1px solid #e0e0e0;
}

.react-datepicker__day--selected {
  background-color: #007bff;
  color: white;
}

.react-datepicker__day--selected:hover {
  background-color: #0069d9;
}

/* ---------- SELECT DROPDOWN ---------- */

select {
  width: 100%;
  padding: 12px;
  border: 1px solid #c0d8d8;
  border-radius: 8px;
  font-size: 15px;
  background-color: #f9f9f9;
  margin-bottom: 15px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color: #2c3e50;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg width=%2712%27 height=%277%27 viewBox=%270 0 12 7%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M1 1L6 6L11 1%27 stroke=%27%23333%27 stroke-width=%272%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
}

select:focus {
  outline: none;
  border-color: #00a8a8;
  box-shadow: 0 0 0 2px rgba(0, 168, 168, 0.2);
}

/* ---------- MISC ---------- */

.web-calendar {
  width: 100%;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px;
}

/* For web input placeholders */
input::placeholder {
  color: #999 !important;
  opacity: 1 !important;
}

/* For web date inputs */
input[type="date"]::placeholder {
  color: #999 !important;
}

@page {
  size: A4;
  margin: 12mm;
}

@media print {
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    height: auto !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* RN web wrappers sometimes cause overflow -> blank page */
  .print-root, .print-page {
    height: auto !important;
    overflow: visible !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }
}

