.cold-penalty-lookup {
    /* max-width: 600px; */
    /* margin: .5em auto; */
    padding: 20px;
    background: #fff;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border: 1px solid var(--scheme-color);
    box-shadow: 0 3px 5px gainsboro;
}

.cpl-form-title {
    text-align: center;
    font-size: 1.8rem;
}

/* Form Styles */
/* .cpl-form-group {
    margin-bottom: 1.5em;
} */

.cpl-form-group label:not(.form-check-label) {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.cpl-form-group select,
.cpl-form-group input:not(.form-check-input) {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.cpl-submit,
.cpl-download-btn {
    background: var(--scheme-color);
    color: #fff;
    padding: 8px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.cpl-submit:hover {
    background: var(--scheme-color);
    opacity: .9;
}

.cpl-submit:disabled,
.cpl-download-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.cpl-download-btn {
    background: #198754;
    color: #fff;
    border: 1px solid #198754;
}

.cpl-download-btn:hover {
    background: #198754;
    opacity: .9;
}
/* Loading State */
.cpl-loading .cpl-submit,
.cpl-loading .cpl-force-update-btn {
    pointer-events: none;
    opacity: 0.7;
}

.cpl-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: cpl-spin 1s linear infinite;
    vertical-align: middle;
}

@keyframes cpl-spin {
    to { transform: rotate(360deg); }
}

/* Results loading state */
.cpl-results.cpl-loading {
    position: relative;
    min-height: 100px;
}

.cpl-results.cpl-loading:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 1;
}

.cpl-results.cpl-loading:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -20px;
    margin-left: -20px;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: cpl-spin 1s linear infinite;
    z-index: 2;
}

/* Results Styles */
.cpl-results {
    display: none;
    margin-top: 1em;
}

.cpl-success,
.cpl-error {
    padding: 15px;
    border-radius: 4px;
    /* margin-bottom: 20px; */
}

.cpl-success {
    background: #f0f6e6;
    border: 1px solid #c6e1a6;
    color: #4a6741;
}

.cpl-error {
    background: #fef0f0;
    border: 1px solid #fcd9d7;
    color: #d63638;
}

/* Violations List Styles */
.cpl-violations {
    margin-top: 20px;
}

.cpl-violations-summary {
    font-size: 1.5em;
    font-weight: 500;
    margin-bottom: 10px;
    color: #1d2327;
    text-align: center;
}

.cpl-violation-item {
    background: #f8d7da;
    border: 1px solid #e2e4e7;
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
}

.cpl-violation-header {
    background: #fff;
    padding: 12px 15px;
    border-bottom: 1px solid #e2e4e7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cpl-violation-plate {
    font-weight: 600;
    font-size: 1.1em;
}

.cpl-violation-status {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.9em;
    font-weight: 500;
}

.cpl-violation-status.status-chaxpht {
    background: #dc3545;
    color: #fff;
}

.cpl-violation-status.status-xpht {
    background: #198754;
    color: #fff;
}

.status-pending {
    background: #fcf9e8;
    color: #907d1a;
}

.status-resolved {
    background: #edfaef;
    color: #2a663c;
}

.cpl-violation-details {
    padding: 15px;
    text-align: left;
}

.cpl-violation-row {
    margin-bottom: 10px;
    line-height: 1.5;
}

.cpl-violation-row:last-child {
    margin-bottom: 0;
}

.cpl-violation-row strong {
    display: inline-block;
    min-width: 100px;
    margin-right: 10px;
}

.table-lookup-history .alert-danger td {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.table-lookup-history .alert-success td {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* Responsive Styles */
@media screen and (max-width: 600px) {
    .cold-penalty-lookup {
        /* margin: 1em; */
        padding: 15px;
    }

    .cpl-violation-row strong {
        display: block;
        margin-bottom: 4px;
    }
}

/* Remove was validated styles */
.form-check-input.is-valid, .was-validated .form-check-input:valid {
    border-color: var(--bs-border-color) !important;
}

.form-check-input.is-valid~.form-check-label, .was-validated .form-check-input:valid~.form-check-label {
    color: var(--bs-body-color) !important;
}

.form-check-input.is-valid:checked, .was-validated .form-check-input:valid:checked {
    background-color: var(--bs-primary) !important;
}

.form-check-input.is-valid:checked, .was-validated .form-check-input:valid:checked {
    border-color: #0d6efd !important;
}