/* General Styles */
body {
    background-color: #f8f9fa;
    color: #212529;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.logo {
    max-height: 80px;
    width: auto;
}

/* Form Styles */
.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Validation Styles */
.form-control.is-invalid,
.was-validated .form-control:invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus,
.was-validated .form-control:invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

/* Admin specific validation */
.sortable-item {
    position: relative;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    background-color: #fff;
}

.sortable-item.has-error {
    border-color: #dc3545;
    padding-right: 1.5rem;
}

/* Card Styles */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

.card-header {
    font-weight: 600;
    padding: 1rem 1.25rem;
}

/* List Group Styles */
.list-group-item {
    border-left: none;
    border-right: none;
    padding: 1rem 1.25rem;
    border-color: rgba(0, 0, 0, 0.05);
}

.list-group-item:first-child {
    border-top: none;
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Price Display */
#totalPrice {
    color: #0d6efd;
    font-weight: bold;
    font-size: 1.5em;
}

#totalPriceWithoutVAT {
    color: #6c757d;
    font-weight: 500;
    font-size: 1.1em;
}

.price-notes {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
}

.price-notes .text-muted {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.price-notes .fas {
    color: #6c757d;
    width: 16px;
}

/* Note Button */
.add-note {
    font-size: 0.8rem;
    padding: 0.15rem 0.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .logo {
        max-height: 60px;
    }

    .card-header h5 {
        font-size: 1.1rem;
    }
}

/* Validation Styles */
.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Loading Spinner */
.spinner-border {
    display: none;
    width: 1.5rem;
    height: 1.5rem;
    border-width: 0.2em;
    margin-right: 0.5rem;
    vertical-align: text-bottom;
}

/* Button Loading State */
.btn .spinner-border {
    display: inline-block;
}

/* Notes Section */
.item-notes {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
    font-size: 0.875rem;
}

.note-item {
    background-color: #f8f9fa;
    border-left: 3px solid #0d6efd;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 0.25rem;
}

.note-item button {
    padding: 0.1rem 0.3rem;
    font-size: 0.7rem;
    line-height: 1;
}

/* Print Styles */
/* Rate Limiting Messages */
.rate-limit-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.rate-limit-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.rate-limit-countdown {
    font-weight: bold;
    font-family: monospace;
}

/* Honeypot field - ensure it's completely hidden */
.honeypot-field {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    z-index: -1 !important;
}

@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

.basic-item .form-check-label {
    color: #000 !important;
}

/* Note text styling - override text-muted to make notes blue */
.item-note {
    color: #0d6efd !important;
}

/* Note button styles */
.add-note {
    display: block !important;
    background-color: transparent !important;
}

.add-note.inactive {
    opacity: 0.6;
    background-color: rgba(108, 117, 125, 0.1) !important;
}

.add-note.active {
    color: #0d6efd !important;
    border-color: #0d6efd !important;
    background-color: transparent !important;
}

.add-note:hover {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

.add-note.inactive:hover {
    background-color: rgba(108, 117, 125, 0.2) !important;
}

.basic-item-note .add-note {
    color: #0d6efd !important;
    border-color: #0d6efd !important;
    background-color: transparent !important;
}