/* Tender Grid Styles */
.mwt-tenders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin: 30px 0;
  padding: 0 20px;
}

.mwt-services-grid-item-wrap {
  border: 3px solid #e8e8e8; /* Default border */
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
  position: relative; /* Important for status indicator positioning */
}

/* Active/Inactive border colors */
.mwt-services-grid-item-wrap.active-tender {
  border-color: #4caf50; /* Green border for active tenders */
}

.mwt-services-grid-item-wrap.inactive-tender {
  border-color: #f44336; /* Red border for inactive tenders */
}

.mwt-services-grid-item-wrap:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.mwt-tender-item {
  padding: 25px;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative; /* Important for status indicator positioning */
}

.mwt-services-grid-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 18px 0;
  color: #333;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
}

/* Download button */
.mwt-tender-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f0f0;
  color: #444;
  padding: 10px 16px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 18px;
  transition: all 0.25s ease;
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.mwt-tender-download-btn:hover {
  background-color: #e0e0e0;
  color: #222;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.download-icon {
  margin-right: 8px;
  font-weight: bold;
  font-size: 16px;
}

.mwt-tender-dates {
  margin-bottom: 18px;
  font-size: 14px;
}

.mwt-tender-date {
  margin-bottom: 8px;
  color: #666;
}

.date-label {
  font-weight: 500;
}

.mwt-tender-content {
  margin-bottom: 22px;
  flex-grow: 1;
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

/* Send offer button - UPDATED STYLE */
.mwt-services-grid-button {
  display: inline-block;
  background-color: white;
  color: #333;
  padding: 12px 24px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
  margin-top: auto;
  border: 2px solid #ffb338;
  cursor: pointer;
}

.mwt-services-grid-button:hover {
  background-color: #ffb338;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2);
}

/* Single Tender Page Styles */
.single-tender-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px 20px;
}

.tender-header {
  margin-bottom: 30px;
  position: relative;
}

.tender-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #333;
}

.tender-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 25px;
  padding: 18px;
  background-color: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.tender-meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-weight: 600;
  font-size: 14px;
  color: #666;
}

.meta-value {
  font-size: 16px;
  color: #333;
  margin-top: 4px;
}

.tender-document-section {
  margin: 25px 0;
  padding: 25px;
  background-color: #f5f5f5;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.tender-document-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f0f0;
  color: #444;
  padding: 12px 25px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tender-document-button:hover {
  background-color: #e0e0e0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tender-content {
  margin-bottom: 30px;
  line-height: 1.6;
}

/* Apply button - UPDATED STYLE */
.tender-apply-button {
  display: inline-block;
  background-color: white;
  color: #333;
  padding: 14px 32px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
  font-size: 16px;
  border: 2px solid #ffb338;
}

.tender-apply-button:hover {
  background-color: #ffb338;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.2);
}

/* Status indicators */
.tender-expired-notice {
  background-color: #ffebee;
  color: #c62828;
  padding: 8px 12px;
  border-radius: 6px;
  margin-top: 10px;
  font-size: 14px;
  text-align: center;
}

.deadline-approaching {
  color: #e65100;
}

.deadline-warning {
  background-color: #fff3e0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  margin-left: 5px;
}

/* Disabled button - UPDATED STYLE */
.button-disabled {
  background-color: #f5f5f5 !important;
  color: #9e9e9e !important;
  cursor: not-allowed !important;
  border-color: #e0e0e0 !important;
  box-shadow: none !important;
}

.button-disabled:hover {
  background-color: #f5f5f5 !important;
  color: #9e9e9e !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Top Banner - FIXED POSITIONING */
.tender-status-banner {
  position: relative; /* Changed from absolute to relative */
  width: 100%;
  padding: 5px 0;
  text-align: center;
  font-weight: bold;
  font-size: 14px;
  z-index: 1; /* Lower z-index to prevent overlapping with site header */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  margin-bottom: 25px; /* Add margin to separate from content */
}

.tender-status-banner.active {
  background-color: #4caf50; /* Green for active */
  color: white;
}

.tender-status-banner.inactive {
  background-color: #f44336; /* Red for inactive */
  color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .mwt-tenders-grid {
    grid-template-columns: 1fr;
  }

  .tender-title {
    font-size: 24px;
  }

  .mwt-tender-item {
    padding: 20px;
  }
}
