/* --------------------------------
   JPS Parcel Tracking – Plugin CSS
--------------------------------- */

.jps-fm-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

/* Header */
.jps-fm-header {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 2px;
    color: #333;
    text-align: center;
    border-bottom: 2px solid #ba141a;
}

.jps-fm-header,
.jps-fm-field label,
.jps-fm-result {
    color: var(--jps-text, #333);
}

/* Form container */
.jps-fm-form {
    width: 100%;
    max-width: 420px;
    padding: 12px 18px 12px;
    border-radius: 18px;
    background: var(--jps-bg, #D3D3D3);
    font-family: var(--jps-font, 'Montserrat'), sans-serif;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* Fields */
.jps-fm-field {
    margin-bottom: 12px;
}

.jps-fm-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

.jps-fm-field input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.jps-fm-field input:focus {
    outline: none;
    border-color: #ba141a;
    box-shadow: 0 0 0 2px rgba(186, 20, 26, 0.15);
}

/* Placeholder text */
.jps-fm-form input::placeholder {
    color: #999;
    font-weight: 400;
    opacity: 1;
}

.jps-fm-form input::-webkit-input-placeholder {
    color: #999;
    font-weight: 400;
}

.jps-fm-form input::-moz-placeholder {
    color: #999;
    font-weight: 400;
}

.jps-fm-form input:-ms-input-placeholder {
    color: #999;
    font-weight: 400;
}

.jps-fm-form input:focus::placeholder {
    opacity: 0.5;
}

/* Remove extra space above the button */
.jps-fm-field:last-of-type {
    margin-bottom: 6px;
}

/* Button */
.jps-fm-button {
    width: 100%;
    padding: 13px;
	font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    background: var(--jps-button, #ba141a);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.05s ease;
}

.jps-fm-button:hover {
    background: var(--jps-button-hover, #8e0000);
}

.jps-fm-button:active {
    transform: translateY(1px);
}

/* Result wrapper */
.jps-fm-result {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.4;
}

/* Success / Error base states */
.jps-fm-result.success {
    color: #2e7d32;
    font-weight: 600;
}

.jps-fm-result.error {
    color: #ba141a;
    font-weight: 600;
}

/* --------------------------------
   Tracking Messages Styling
--------------------------------- */

/* Latest update */
.jps-fm-result.success .tracking-latest {
    background: #f5f7fa;
    border-left: 5px solid #0073aa;
    padding: 14px 16px;
    margin-top: 16px;
    text-align: left;

    /* reset inherited success styles */
    color: #1e293b;
    font-weight: 400;
}

/* Latest label */
.jps-fm-result.success .tracking-latest strong {
    display: block;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0073aa;
    margin-bottom: 6px;
    font-weight: 600;
}

/* Latest message text */
.jps-fm-result.success .tracking-latest > div {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
}

/* History title */
.jps-fm-result.success .tracking-history-title {
    margin-top: 18px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1e293b;
    text-align: left;
}

/* History list */
.jps-fm-result.success .tracking-history {
    margin-top: 8px;
    padding-left: 18px;
    text-align: left;

    /* reset inherited success styles */
    color: #1e293b;
    font-weight: 400;
}

/* Base error container */
.jps-fm-result.error {
  background-color: #f5f7fa;          /* soft red background */
  border-left: 4px solid #c62828;     /* strong error accent */
  color: #7a1c1c;                     /* readable dark red */
  padding: 12px 12px;
  border-radius: 6px;
  font-weight: 600;
  line-height: 1.4;
}

/* Remove any "Latest update" label styling inside errors */
.jps-fm-result.error .tracking-latest strong {
  display: none;
}

/* Ensure only one message shows cleanly */
.jps-fm-result.error .tracking-history,
.jps-fm-result.error .tracking-history-title {
  display: none;
}