/* Shared component styles used across multiple pages */

/* Contract-related styles (shared between uploads and contracts pages) */
.contracts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-right: 8px;
}

.contracts-title {
  font-size: 26px;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0;
}

.contracts-add-button {
  background-color: #3e96ff;
  color: white;
  padding: 10px 24px;
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  border-radius: 9999px;
  text-decoration: none;
  transition: background-color 0.2s ease;
  border: 0px;
}

.contracts-add-button:hover {
  background-color: #166ed7;
}

.contracts-save-button {
  background-color: #20212D;
  color: white;
  padding: 10px 24px;
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  border-radius: 9999px;
  text-decoration: none;
  transition: background-color 0.2s ease;
  border: 0px;
  min-width: 150px;
}

.contracts-save-button:hover {
  background-color: #494A56;
}

.contracts-spot-button {
  background-color: #D33F49;
  color: white;
  padding: 10px 24px;
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  border-radius: 9999px;
  text-decoration: none;
  transition: background-color 0.2s ease;
  border: 0px;
  min-width: 150px;
}

.contracts-spot-button:hover {
  background-color: #B4333C;
}

.contract-tag {
  background-color: #B9D9FF;
  color: #20212D;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  display: inline-block;
}

/* Common utility classes */
.hidden-file-input {
  display: none;
}

.badge {
  background-color: #f2f2f2;
  color: #333;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: auto;
}

.horizontal-line {
  height: 1px;
  background-color: #E5E5E5;
  width: 100%;
}

/* Modal styles */
.modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 32px;
  border-radius: 12px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.form-input {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* Common button styles - removed unused add-button */

/* Common layout styles */
.contract-page-layout {
  display: flex;
  flex-direction: row;
  height: 100%;
  gap: 32px;
}

.contract-list-panel {
  width: 300px;
  flex-shrink: 0;
  overflow-y: auto;
  border-right: 1px solid #eee;
}

.main-content-panel {
  flex-grow: 1;
  padding-left: 24px;
  overflow-y: auto;
  max-width: 720px;
}

/* Mobile responsive layout */
@media (max-width: 768px) {
  .contract-page-layout {
    flex-direction: column;
    gap: 8px;
  }

  .contract-list-panel {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
  }

  .main-content-panel {
    padding-left: 0;
    max-width: none;
  }

  /* Compact button styles for mobile */
  .contracts-spot-button {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
  }

  .contracts-spot-button.delete-btn-compact {
    padding: 4px 8px;
    font-size: 11px;
  }

  .form-input {
    padding: 6px 8px;
    font-size: 13px;
  }

  .form-button {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* Sort toggle styles */
.sort-toggle-group {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.sort-toggle {
  display: inline-block;  
  background: var(--TB-Ligth-Grey, #E5E5E5);
  color: #1a1a1a;
  padding: 8px 15px;
  border-radius: 9999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.sort-toggle:hover {
  background-color: #d5d5d5;
}

.sort-toggle.active {
  background: var(--TB-Dark-Grey, #20212D);
  color: #fff;
}

/* Related files styles */
.related-files {
  margin-top: 32px;
  border-top: 1px solid #eee;
  padding-top: 24px;
}

.related-files-area {
  padding: 30px;
  border: 1px solid var(--TB-Dark-Grey, #20212D);
  border-radius: 15px;
}

.related-files-table {
  width: 100%;
  border-collapse: collapse;
}

.related-files-table th {
  background-color: #fff;
  border-bottom: 1px solid #20212D;
  font-weight: bold;
  color: #333;
}

.related-files-table td {
  padding: 12px;
  border-bottom: 1px solid #eaeaea;
  text-align: left;
  font-size: 14px;
}

/* Tab toggle styles */
.tab-toggle {
  display: flex;
  border-radius: 9999px;
  background-color: #eee;
  overflow: hidden;
  width: fit-content;
  margin-bottom: 20px;
}

.tab {
  padding: 8px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: #555;
}

.tab.active {
  background-color: white;
  color: #000;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Hide utility */
.hidden {
  display: none;
}
