/* 
    Created on : Oct 6, 2025, 1:41:17 PM
    Author     : s161431
*/

form#notificationForm {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    padding: 2rem 3rem;
    margin: 2rem auto;
    max-width: 900px;
    border: 1px solid #e5e7eb;
}

form#notificationForm h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1f3554;
    margin-bottom: 1rem;
}

form#notificationForm h2 {
    font-size: 1.2rem;
    margin: 1.8rem 0 0.8rem;
    color: #1f3554;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.3rem;
}

form#notificationForm table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

form#notificationForm td {
    padding: 0.5rem 1rem 0.5rem 0;
    vertical-align: middle;
}

label {
    display: block;
    font-weight: 600;
    color: #1f3554;
    margin-bottom: 0.3rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    background-color: #f9fafb;
    transition: all 0.2s ease-in-out;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #39668f;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(57,102,143,0.2);
}

textarea {
    resize: vertical;
    min-height: 8em;
}

/* --- Field Groups --- */
.field-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 2rem;
    min-height: 75px;
    position: relative;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    position: relative;
}
.field-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.field-group input,
.field-group select {
    width: 100%;
}

.field-group .error-message {
    position: absolute;
    top: calc(100% + 3px);
    /*bottom: -20px;*/
    left: 0;
    width: max-content;
    max-width: 95%;
    background: #fdecea;
    border-left: 4px solid #e53935;
    color: #b71c1c;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-sizing: border-box;
    z-index: 10;
    white-space: nowrap;
}

/* --- Validation & Warning Messages --- */
#error-messages {
    color: #d93025;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

#equipwarning {
    display: inline-flex;
    position: static !important;
    top: calc(100% + 2px);
    margin-left: 0;
    align-items: center;
    justify-content: flex-start;
    align-self: flex-start;
    gap: 1px;
    background: #fdecea;
    border-left: 4px solid #e53935;
    color: #b71c1c;
    padding: 4px 7px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 400;
    margin: 6px auto 0;
    margin-top: -27px;
    margin-bottom: 6px;
    text-align: left;
    width: fit-content;
    min-width: unset;
    max-width: 95%;
    white-space: nowrap;
    box-shadow: 0 2px 3px rgba(229, 57, 53, 0.15);
}

.or-row + #equipwarning {
  display: block;
  text-align: left;
  margin-left: 0;
  justify-self: start;
}

.or-row {
  justify-content: flex-start !important;
  text-align: left !important;
}

#equipwarning:empty {
  display: none !important;
  padding: 0 !important;
  border: none !important;
}

/* --- Buttons --- */
button,
input[type="submit"],
.btn-submit {
    display: inline-block;
    padding: 0.65rem 1.4rem;
    background: #2a466f;
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

button:hover,
input[type="submit"]:hover,
.btn-submit:hover {
    background: #1f3554;
    transform: translateY(-1px);
}

/* --- Recaptcha --- */
.g-recaptcha {
  display: block;
  transform: scale(1);
  transform-origin: center;
  margin: 0;
}

/* --- Section Notes --- */
.section-note {
    background: #fff7ed;
    border-left: 4px solid #d97706;
    padding: 0.8rem 1rem;
    color: #92400e;
    border-radius: 6px;
    margin: 1rem 0;
    font-size: 0.95rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .field-row,
    .field-row-3 {
        grid-template-columns: 1fr;
    }

    form#notificationForm {
        padding: 1.5rem;
    }
}

label span,
.required-marker,
.required,
.form-label .required {
    color: #cc0000 !important;
    font-weight: bold;
    font-size: 1.2em;
}

/*Just for OR part:*/
.or-row {
    display: flex;
    position: relative;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.or-row .field-group {
    flex: 1;
    min-width: 220px;
}

.or-divider {
    font-weight: 700;
    color: #cc0000;
    font-size: 1.1rem;
    text-transform: uppercase;
    align-self: center;
    letter-spacing: 1px;
}

.message-box.warning {
    background-color: #fff8e1;
    border: 1px solid #f1c232;
    border-left: 4px solid #d48806;
    padding: 1.5em 2em;
    border-radius: 6px;
    margin-top: 2em;
    line-height: 1.6;
}

.ticket-info {
    background: #f9fafb;
    border-left: 4px solid #005ea2;
    padding: 1em 1.5em;
    margin: 2em 0 1em;
}

.ticket-id {
    color: #005ea2;
    font-weight: bold;
}

.actions {
    margin-top: 2em;
}

.confirmation-box {
    background-color: #f6f8fa;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 2em;
    margin-top: 2em;
    line-height: 1.6;
}

.ticket-info {
    background: #fff;
    border-left: 4px solid #005ea2;
    padding: 1em 1.5em;
    margin: 1.5em 0;
    font-size: 1.1em;
}

.ticket-id {
    color: #005ea2;
    font-weight: bold;
}

.actions {
    margin-top: 2em;
}

/* --- Validation Error Styles --- */
.input-error {
    border: 1.5px solid #e53935 !important;
    background-color: #fff8f8;
    box-shadow: 0 0 3px rgba(229, 57, 53, 0.4);
}

.error-message {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    background: #fdecea;
    border-left: 4px solid #e53935;
    color: #b71c1c;
    border-radius: 4px;
    font-size: 0.60rem;
    font-weight: 400;
    line-height: 1.1;
    padding: 2px 4px;
    margin: 6px auto 0;   
    position: absolute;
    top: 100%;
    margin-top: 1px;
    margin-bottom: 10px;
    text-align: center;
    width: auto;
    max-width: 100%;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(229, 57, 53, 0.15); 
}

.error-message::before {
    content: "⚠️";
    font-size: 0.85rem;
}

.or-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 1rem;
    position: relative;
}

.or-row .error-container {
    grid-column: 1 / span 3;
    justify-self: center;
    margin-top: 0.3rem;
}


.or-row .error-message {
    position: absolute;
    top: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 90%;
    background: #fdecea;
    border-left: 4px solid #e53935;
    color: #b71c1c;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(229, 57, 53, 0.1);
    z-index: 10;
    white-space: nowrap;
}

.error-message {
    transition: opacity 0.2s ease;
}

.error-message.fade-out {
    opacity: 0;
}

.fade-in {
    animation: fadeIn 0.45s ease-out forwards;
}

.fade-out {
    animation: fadeOut 0.45s ease-in forwards;
}

.fade-in {
    opacity: 0;
    transform: translateY(-6px);
    animation: fadeInAnim 0.45s ease-out;
    animation-fill-mode: forwards;
}

.fade-out {
    opacity: 1;
    transform: translateY(0);
    animation: fadeOutAnim 0.45s ease-in;
    animation-fill-mode: forwards;
}

@keyframes fadeInAnim {
    0% {
        opacity: 0;
        transform: translateY(-6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutAnim {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-6px);
    }
}

#recaptchaWrapper.error {
  border: 1px solid #e53935;
  background: #fff8f8;
  border-radius: 6px;
  padding: 0px;
  display: inline-block;
  box-shadow: 0 0 4px rgba(229, 57, 53, 0.3);
}

#recaptchaWrapper {
  position: relative;
  display: inline-block;
}

#recaptchaWrapper .error-message {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  justify-content: flex-start;
  background: #fdecea;
  border-left: 4px solid #e53935;
  color: #b71c1c;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.80rem;
  font-weight: 400;
  box-shadow: 0 2px 3px rgba(229, 57, 53, 0.15);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  white-space: normal;
}

/* --- Custom Confirm Modal --- */
.custom-modal {
  display: none; 
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.35);
  justify-content: center;
  align-items: center;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.custom-modal-content {
  background: #fff;
  border-radius: 8px;
  min-width: 360px;
  max-width: 90%;
  box-shadow: 0 20px 40px rgba(0,0,0,.18);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
  animation: fadeIn .22s ease;
}

.custom-modal-header {
  background: #1f3b63;
  color: #fff;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;;
  align-items: center;
  gap: .3rem;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  line-height: 1;
  text-align: left;
}

.custom-modal-icon {
  font-size: 1rem;
  line-height: 1;
}

.custom-modal-title {
  display: block;
  line-height: 1.3;
}

.custom-modal-body {
  padding: 16px 20px 20px;
  font-size: .9rem;
  color: #2f2f2f;
  text-align: center;
}

.custom-modal-body p {
  margin: 0 0 16px 0;
  line-height: 1.4;
}

.custom-modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.btn-primary-sm {
  background: #1f3b63;
  color: #fff;
  border: 1px solid rgba(0,0,0,.2);
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 500;
  padding: 7px 14px;
  line-height: 1.2;
  box-shadow: 0 3px 6px rgba(0,0,0,.22);
  cursor: pointer;
}

.btn-primary-sm:hover {
  background: #172e4b;
}

.btn-ghost-sm {
  background: #f8f8f8;
  color: #1f2a37;
  border: 1px solid rgba(0,0,0,.2);
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 500;
  padding: 7px 14px;
  line-height: 1.2;
  cursor: pointer;
}

.btn-ghost-sm:hover {
  background: #ececec;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Make Time of Incident error fully visible under the input */
.field-group #incidentTime ~ .error-message {
    width: 100% !important;      /* match the input width */
    max-width: 100% !important;
    text-align: left;
}