/* BNR Motorcycle Spec Block Styles */

.bnr-msb-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Frontend Filter Styles */
.bnr-msb-finder {
  margin-bottom: 30px;
}

.bnr-msb-finder-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 24px;
  margin-bottom: 20px;
}

.bnr-msb-finder-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0 0 20px 0;
  text-align: center;
}

.bnr-msb-finder-form {
  width: 100%;
}

/* Default layout (row) */
.bnr-msb-finder-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: end;
}

/* Row layout (explicit) */
.bnr-msb-layout-row .bnr-msb-finder-fields {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
  gap: 16px;
  align-items: end;
}

/* Column layout */
.bnr-msb-layout-column {
  max-width: 400px !important;
}

.bnr-msb-layout-column .bnr-msb-finder-fields {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px;
  align-items: flex-start;
}

.bnr-msb-layout-column .bnr-msb-field {
  width: 100%;
  max-width: 350px;
}

/* Responsive adjustments for vertical layout */
@media (max-width: 768px) {
  .bnr-msb-layout-column {
    max-width: 100% !important;
  }
  
  .bnr-msb-layout-column .bnr-msb-field {
    max-width: 100%;
  }
}

.bnr-msb-field {
  display: flex;
  flex-direction: column;
}

.bnr-msb-field label {
  font-size: 14px;
  font-weight: 500;
  color: #555;
  margin-bottom: 6px;
}

.bnr-msb-select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
  color: #333;
  transition: border-color 0.2s ease;
}

.bnr-msb-select:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.bnr-msb-find-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  height: fit-content;
}

.bnr-msb-find-btn:hover {
  background: #c82333;
}

.bnr-msb-find-btn:active {
  background: #bd2130;
}

.bnr-msb-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.bnr-msb-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.bnr-msb-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.bnr-msb-card-link:hover .bnr-msb-card {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.bnr-msb-card-link:hover {
  text-decoration: none;
  color: inherit;
}

.bnr-msb-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bnr-msb-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.bnr-msb-image--placeholder {
  background: #e9ecef;
  color: #6c757d;
  font-size: 14px;
  font-weight: 500;
}

.bnr-msb-content {
  padding: 16px;
}

.bnr-msb-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: #333;
  line-height: 1.3;
}

.bnr-msb-specs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bnr-msb-spec {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  line-height: 1.4;
}

.bnr-msb-spec-label {
  color: #666;
  font-weight: 500;
  flex-shrink: 0;
  margin-right: 8px;
}

.bnr-msb-spec-value {
  color: #333;
  font-weight: 400;
  text-align: right;
  word-break: break-word;
}

/* Pagination Styles */
.bnr-msb-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
  padding: 20px 0;
}

.bnr-msb-pagination-link {
  display: inline-block;
  padding: 8px 16px;
  background: #007cba;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.bnr-msb-pagination-link:hover {
  background: #005a87;
  color: white;
  text-decoration: none;
}

.bnr-msb-pagination-info {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

/* Empty State */
.bnr-msb-empty {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px dashed #dee2e6;
}

/* Editor Placeholder */
.bnr-msb-editor-placeholder {
  border: 2px dashed #ccc;
  padding: 20px;
  text-align: center;
  background: #f9f9f9;
  border-radius: 8px;
  margin: 10px 0;
}

.bnr-msb-editor-preview h3 {
  margin: 0 0 10px 0;
  color: #333;
}

.bnr-msb-editor-preview p {
  margin: 5px 0;
  color: #666;
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .bnr-msb-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
  }
}

@media (max-width: 992px) {
  .bnr-msb-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  
  .bnr-msb-image {
    height: 180px;
  }
  
  .bnr-msb-title {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .bnr-msb-container {
    padding: 15px;
  }
  
  .bnr-msb-finder-card {
    padding: 16px;
  }
  
  .bnr-msb-finder-fields {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .bnr-msb-find-btn {
    width: 100%;
    padding: 12px;
  }
  
  .bnr-msb-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  
  .bnr-msb-image {
    height: 160px;
  }
  
  .bnr-msb-content {
    padding: 12px;
  }
  
  .bnr-msb-title {
    font-size: 14px;
    margin-bottom: 10px;
  }
  
  .bnr-msb-spec {
    font-size: 12px;
  }
  
  .bnr-msb-pagination {
    flex-direction: column;
    gap: 12px;
  }
  
  .bnr-msb-pagination-link {
    padding: 10px 20px;
    font-size: 16px;
  }
}

@media (max-width: 576px) {
  .bnr-msb-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .bnr-msb-image {
    height: 140px;
  }
  
  .bnr-msb-content {
    padding: 10px;
  }
  
  .bnr-msb-title {
    font-size: 13px;
    margin-bottom: 8px;
  }
  
  .bnr-msb-spec {
    font-size: 11px;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  
  .bnr-msb-spec-value {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .bnr-msb-container {
    padding: 10px;
  }
  
  .bnr-msb-grid {
    gap: 10px;
  }
  
  .bnr-msb-image {
    height: 120px;
  }
  
  .bnr-msb-content {
    padding: 8px;
  }
  
  .bnr-msb-title {
    font-size: 12px;
  }
  
  .bnr-msb-spec {
    font-size: 10px;
  }
}

/* Loading animation for images */
.bnr-msb-image img {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bnr-msb-image img.bnr-msb-image-loaded {
  opacity: 1;
}

/* Motorcycle Details Styles */
.bnr-msb-motorcycle-details {
  margin-top: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.bnr-msb-details-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bnr-msb-specs-column {
  padding: 24px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.bnr-msb-history-column {
  padding: 24px;
  background: #fff;
}

.bnr-msb-specs-section {
  margin-bottom: 24px;
}

.bnr-msb-specs-section:last-child {
  margin-bottom: 0;
}

.bnr-msb-specs-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #dc3545;
}

.bnr-msb-specs-table {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.bnr-msb-spec-row {
  display: flex;
  padding: 12px 16px;
  border-bottom: 1px solid #e9ecef;
}

.bnr-msb-spec-row:last-child {
  border-bottom: none;
}

.bnr-msb-spec-row:nth-child(even) {
  background: #f8f9fa;
}

.bnr-msb-spec-label {
  font-weight: 600;
  color: #495057;
  min-width: 120px;
  margin-right: 16px;
}

.bnr-msb-spec-value {
  color: #333;
  flex: 1;
}

/* History Section Styles */
.bnr-msb-history-section {
  height: 100%;
}

.bnr-msb-history-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0 0 20px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #dc3545;
}

.bnr-msb-history-content {
  height: calc(100% - 60px);
  overflow-y: auto;
}

.bnr-msb-history-info {
  margin-bottom: 24px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.bnr-msb-history-item {
  flex: 1;
  min-width: 200px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #dc3545;
}

.bnr-msb-history-item strong {
  display: block;
  color: #495057;
  font-size: 14px;
  margin-bottom: 4px;
}

.bnr-msb-history-item span {
  color: #333;
  font-size: 16px;
}

.bnr-msb-history-text {
  margin-top: 24px;
}

.bnr-msb-history-text h4 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0 0 12px 0;
}

.bnr-msb-history-text p {
  color: #555;
  line-height: 1.6;
  margin: 0;
  text-align: justify;
}

.bnr-msb-no-history {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
}

.bnr-msb-error {
  background: #f8d7da;
  color: #721c24;
  padding: 16px;
  border-radius: 6px;
  border: 1px solid #f5c6cb;
  margin: 20px 0;
  text-align: center;
}

/* Mobile responsive for motorcycle details */
@media (max-width: 768px) {
  .bnr-msb-specs-column,
  .bnr-msb-history-column {
    padding: 16px;
  }
  
  .bnr-msb-spec-label {
    min-width: 100px;
    font-size: 14px;
  }
  
  .bnr-msb-spec-value {
    font-size: 14px;
  }
  
  .bnr-msb-history-content {
    height: auto;
    max-height: 400px;
  }
  
  .bnr-msb-history-info {
    flex-direction: column;
    gap: 12px;
  }
  
  .bnr-msb-history-item {
    min-width: auto;
  }
}

/* Print styles */
@media print {
  .bnr-msb-pagination {
    display: none;
  }
  
  .bnr-msb-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
