html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Cardinal Propane — primary button (cardinal red) overrides */
.btn-primary {
  background-color: #C41E3A;
  border-color: #A9152C;
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #A9162F;
  border-color: #8F1226;
  color: #fff;
  outline: none;
  box-shadow: 0 0 0 0.25rem rgba(196, 30, 58, 0.25);
}

.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
  background-color: #8F1226;
  border-color: #7A0F20;
  color: #fff;
}

.btn-primary.disabled,
.btn-primary:disabled {
  background-color: #C41E3A;
  border-color: #A9152C;
  color: #fff;
  opacity: 0.65;
}

/* Custom blue for btn-info */
.btn-info {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
}

.btn-info:hover,
.btn-info:focus {
  background-color: #0b5ed7;
  border-color: #0a58ca;
  color: #fff;
  outline: none;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.btn-info:active,
.btn-info.active,
.show > .btn-info.dropdown-toggle {
  background-color: #0a58ca;
  border-color: #0a53be;
  color: #fff;
}

.btn-info.disabled,
.btn-info:disabled {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
  opacity: 0.65;
}

/* Cardinal navbar primary (cardinal red) */
.navbar.bg-primary {
  background-color: #C41E3A !important;
  border-bottom: 3px solid #A9152C;
}

.navbar.bg-primary .navbar-brand,
.navbar.bg-primary .nav-link,
.navbar.bg-primary .navbar-text {
  color: #fff !important;
}

.navbar.bg-primary .nav-link:hover,
.navbar.bg-primary .nav-link:focus {
  color: #ffe6ea !important;
}

/* Dropdown menu styling to improve contrast */
.navbar.bg-primary .dropdown-menu {
  min-width: 200px;
}

.navbar.bg-primary .dropdown-item:hover,
.navbar.bg-primary .dropdown-item:focus {
  background-color: rgba(196, 30, 58, 0.08);
}

/* Customer Account Information Styling */
.info-section {
    position: relative;
}

.info-item {
    position: relative;
    padding: 0;
}

.info-icon {
    width: 36px;
    flex-shrink: 0;
    margin-right: 12px;
}

.info-icon i {
    font-size: 1.25rem;
}

.info-item label {
    display: block;
    font-weight: 500;
    color: #6c757d;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item .fw-semibold {
    color: #212529;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.address-block {
    line-height: 1.6;
}

.address-block div {
    margin-bottom: 2px;
}

/* Stat Cards */
.stat-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #dee2e6;
}

.stat-icon {
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1);
}

.stat-value {
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Card Enhancements */
.card.border-0 {
    border-radius: 12px;
    overflow: hidden;
}

.card-header.bg-white {
    background-color: #fff !important;
}

/* Link Styling in Info Cards */
.info-item a {
    color: #0d6efd;
    transition: color 0.2s ease;
}

.info-item a:hover {
    color: #0a58ca;
    text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .info-icon {
        width: 32px;
        margin-right: 10px;
    }
    
    .info-icon i {
        font-size: 1.125rem;
    }
    
    .stat-card {
        margin-bottom: 12px;
    }
}

/* Customer Order History Search and Filter Styles */
#ordersTable .order-row {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#ordersTable .order-row[style*="display: none"] {
    opacity: 0;
    transform: scale(0.98);
}

.search-highlight-pulse {
    animation: highlightPulse 0.3s ease;
}

@keyframes highlightPulse {
    0% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(13, 110, 253, 0.1);
    }
    100% {
        background-color: transparent;
    }
}

/* Search and Filter Card Styling */
#searchInput {
    border-left: 3px solid #0d6efd;
}

#searchInput:focus {
    border-left-color: #0a58ca;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

#statusFilter,
#paymentFilter {
    cursor: pointer;
}

#statusFilter:hover,
#paymentFilter:hover {
    border-color: #0d6efd;
}

/* No Results Message Styling */
#noResultsMessage {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filter Card Enhancements */
.card.bg-light {
    background-color: #f8f9fa !important;
    transition: all 0.2s ease;
}

.card.bg-light:hover {
    background-color: #e9ecef !important;
}

/* Reset Button Hover Effect */
#resetFilters:hover {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

/* Results Count Styling */
#visibleCount {
    font-weight: 600;
    color: #0d6efd;
}

#totalCount {
    font-weight: 600;
}

/* Table Row Hover Effect Enhancement */
#ordersTable .order-row:hover {
    background-color: rgba(13, 110, 253, 0.05);
    transform: scale(1.01);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Responsive Filter Layout */
@media (max-width: 767.98px) {
    #searchInput,
    #statusFilter,
    #paymentFilter {
        font-size: 0.875rem;
    }

    .form-label {
        margin-bottom: 0.25rem;
    }
}

/* Clear Search Button in No Results */
#clearSearchBtn {
    transition: all 0.2s ease;
}

#clearSearchBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.2);
}

/* Admin Order Edit Page Styles */
.form-label {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.form-label .text-danger {
    font-size: 0.875rem;
}

.card-body h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
}

.card-body h5 i {
    font-size: 1rem;
    margin-right: 0.25rem;
}

/* Section Spacing */
.row.mb-4:last-of-type {
    margin-bottom: 1rem !important;
}

/* Input Groups */
.input-group-text {
    font-weight: 500;
    background-color: #e9ecef;
}

/* Read-only Inputs */
input[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* Custom Tank Size Input */
#tankSizeCustomEdit {
    border-top: 1px dashed #ced4da;
}

/* Switch Label Update */
.form-check-input:checked ~ .form-check-label {
    color: #198754;
    font-weight: 600;
}

.form-check-input:not(:checked) ~ .form-check-label {
    color: #6c757d;
}

/* Validation Errors */
.text-danger {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* JSON Textarea */
.font-monospace {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    background-color: #f8f9fa;
}

/* Action Buttons Section */
.border-top {
    border-color: #dee2e6 !important;
}

/* Responsive Adjustments for Admin Edit */
@media (max-width: 767.98px) {
    .card-body {
        padding: 1.5rem !important;
    }

    .card-body h5 {
        font-size: 1rem;
    }

    .form-label {
        font-size: 0.875rem;
    }

    .btn {
        font-size: 0.875rem;
    }
}

/* Required Field Indicator */
.form-label .text-danger {
    font-weight: bold;
}

/* Section Headers */
.border-bottom {
    border-color: #dee2e6 !important;
    margin-bottom: 1rem;
}

/* Help Text */
small.text-muted {
    font-size: 0.8125rem;
    margin-top: 0.25rem;
    display: block;
}

/* Alert Enhancements */
.alert ul {
    padding-left: 1.25rem;
    margin-bottom: 0;
}

.alert ul li {
    margin-bottom: 0.25rem;
}

/* Button Hover Effects */
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.btn-outline-secondary:hover {
    transform: translateY(-1px);
}

/* Check Payment Section Toggle */
#checkPaymentSection {
    transition: all 0.3s ease;
}

/* Info Header */
.h4 + .text-muted {
    font-size: 0.875rem;
}

.h4 + .text-muted i {
    font-size: 0.875rem;
}

/* Required Field Asterisk - Keep Inline */
.form-label .text-danger {
    display: inline;
    margin-left: 2px;
    font-size: inherit;
    white-space: nowrap;
}

.form-label {
    display: inline-block;
    white-space: normal;
}

/* Multiple Tanks Styling */
#tanksContainer .card {
    transition: all 0.3s ease;
}

#tanksContainer .card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#tanksContainer .border-start {
    border-left-width: 4px !important;
}

#tanksContainer .tank-size-custom {
    border-top: 1px dashed #ced4da;
}

#addTankBtn {
    transition: all 0.2s ease;
}

#addTankBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.2);
}

#tanksContainer .alert-info {
    background-color: #e7f3ff;
    border-color: #b6d4fe;
    color: #004085;
}
