/* PoliDraft Custom Styles */

/* Custom CSS Variables */
:root {
  --polidraft-blue: #1800ad;
  --polidraft-blue-hover: #1800ad;
  --polidraft-light-blue: #add8e6;
  --polidraft-gray: #6b7280;
  --polidraft-light-gray: #f9fafb;
  --polidraft-border: #e5e7eb;
  --polidraft-text-dark: #374151;
}

/* PoliDraft Single-Column Login/Register Page Styles */
.polidraft-auth-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #f6f4f0;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

h2 {
  font-family: "Libre Baskerville", serif;
  font-weight: 400;
  color: var(--polidraft-text-dark);
}

.polidraft-text-dark {
  color: var(--polidraft-text-dark) !important;
}

.polidraft-logo-section {
  text-align: center;
  margin-top: 60px;
}

.polidraft-logo {
  max-width: 200px;
  max-height: 80px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.polidraft-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.polidraft-auth-card {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
  text-align: center;
  margin: 0 auto;
  overflow: hidden;
}

.polidraft-footer-links {
  display: flex;
  gap: 30px;
  padding-top: 20px;
  margin-bottom: 40px;
}

.polidraft-footer-links a {
  color: var(--polidraft-blue);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
  font-size: 14px;
  text-transform: lowercase;
}

.polidraft-footer-links a:hover {
  opacity: 1;
}

.polidraft-welcome-text {
  font-size: 24px;
  font-weight: bold;
  color: black;
  text-align: center;
  margin-bottom: 30px;
  font-family: "Georgia", serif;
}

.polidraft-tab-buttons {
  display: flex;
  margin-bottom: 30px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--polidraft-border);
  background: white;
  width: 100%;
}

.polidraft-tab-button {
  flex: 1;
  padding: 12px 24px;
  border: none;
  background: white;
  color: var(--polidraft-text-dark);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.polidraft-tab-button.active {
  background: var(--polidraft-blue);
  color: white;
  border: none;
}

.polidraft-tab-button:hover:not(.active) {
  background: #f0f0f0;
}

.polidraft-auth-form {
  width: 100%;
  max-width: 320px;
}

.polidraft-form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--polidraft-border);
  border-radius: 6px;
  font-size: 16px;
  background: white;
  transition: all 0.3s ease;
  box-sizing: border-box;
  margin-bottom: 16px;
  color: var(--polidraft-text-dark);
}

.polidraft-form-input:focus {
  outline: none;
  border-color: var(--polidraft-light-blue);
  background: white;
  box-shadow: 0 0 0 3px rgba(173, 216, 230, 0.1);
}

.polidraft-submit-button {
  width: 100%;
  padding: 14px;
  background: var(--polidraft-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 10px;
}

.polidraft-button-secondary {
  font-family: "Inter", sans-serif;
  width: 25%;
  padding: 5px 10px;
  background: var(--polidraft-gray);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 400;
  cursor: pointer;
  transition: background-color 0.3s ease;
  align-self: flex-end;
  margin-top: 10px;
}
.polidraft-button-secondary:hover {
  background: white;
  border: 1px solid var(--polidraft-border);
  color: var(--polidraft-text-dark);
}

.polidraft-submit-button:hover {
  background: var(--polidraft-blue-hover);
  color: white;
}

/* Responsive design */
@media (max-width: 768px) {
  .polidraft-auth-container {
    padding: 20px 15px;
  }

  .polidraft-logo-section {
    margin-top: 40px;
  }

  .polidraft-logo {
    max-width: 150px;
    max-height: 60px;
  }

  .polidraft-auth-card {
    padding: 30px 25px;
    max-width: 350px;
  }

  .polidraft-footer-links {
    gap: 20px;
    margin-bottom: 30px;
  }
}

/* Bootstrap overrides for PoliDraft theme */
.btn-polidraft-primary {
  background-color: var(--polidraft-blue);
  border-color: var(--polidraft-blue);
  color: white;
}

.btn-polidraft-primary:hover {
  background-color: var(--polidraft-blue-hover);
  border-color: var(--polidraft-blue-hover);
  color: white;
}

.btn-outline-polidraft-primary {
  color: var(--polidraft-blue);
  border-color: var(--polidraft-blue);
}

.btn-outline-polidraft-primary:hover {
  background-color: var(--polidraft-blue);
  border-color: var(--polidraft-blue);
  color: white;
}

.text-polidraft-blue {
  color: var(--polidraft-blue) !important;
}

.bg-polidraft-blue {
  background-color: var(--polidraft-blue) !important;
}

.bg-polidraft-light-gray {
  background-color: var(--polidraft-light-gray) !important;
}

.border-polidraft {
  border-color: var(--polidraft-border) !important;
}

/* Card enhancements */
.card.shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.card-header.bg-polidraft-blue {
  background-color: var(--polidraft-blue) !important;
  border-bottom: 1px solid var(--polidraft-blue);
}

/* Badge styling */
.badge.bg-polidraft-blue {
  background-color: var(--polidraft-blue) !important;
  font-family: "Inter", sans-serif;
  font-weight: 400;
}

.badge.project-status-badge {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.2rem;
  color: white;
}
.badge.project-status-badge.published {
  background-color: #28a745;
}
.badge.project-status-badge.draft {
  background-color: #6c757d;
}
.badge.project-status-badge.archived {
  background-color: #dc3545;
}

/* Form styling */
.form-control:focus {
  border-color: var(--polidraft-blue);
  box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
}

/* Navigation styling */
.navbar-dark.bg-polidraft-blue {
  background-color: var(--polidraft-blue) !important;
}

.navbar-brand {
  font-weight: bold;
}

/* Navigation icon sizing */
.nav-icon {
  font-size: 1.2rem;
}

/* Custom active navigation styling */
.nav-link.active-nav {
  background-color: var(--polidraft-blue) !important;
  border: 1px solid var(--polidraft-blue-hover);
}

/* Custom tooltip styling */
.tooltip {
  font-size: 0.875rem;
}

.tooltip-inner {
  background-color: var(--polidraft-blue);
  font-weight: bold;
  font-size: 1.3rem;
  color: white;
  border-radius: 6px;
  padding: 8px 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tooltip.bs-tooltip-end .tooltip-arrow::before {
  border-right-color: var(--polidraft-blue);
}

/* Projects Table Styles */
.projects-table {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.table-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  padding: 1rem;
  background-color: var(--polidraft-light-gray);
  border-bottom: 1px solid var(--polidraft-border);
  font-weight: 600;
  color: var(--polidraft-text-dark);
}

.header-project-name {
  text-align: left;
}

.header-status {
  text-align: center;
  width: 120px;
}

.header-last-edited {
  text-align: right;
  width: 120px;
}

.table-row {
  display: grid;
  grid-template-columns: 1fr 120px 120px;
  padding: 1rem;
  border-bottom: 1px solid var(--polidraft-border);
  cursor: pointer;
  transition: background-color 0.2s;
}

.table-row:hover {
  background-color: var(--polidraft-light-gray);
}

.table-row:last-child {
  border-bottom: none;
}

.project-name {
  text-align: left;
  font-weight: 500;
  color: var(--polidraft-text-dark);
}

.status {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
}

.last-edited {
  text-align: right;
  color: var(--polidraft-gray);
  font-size: 0.9rem;
  width: 120px;
}

.empty-state {
  text-align: center;
  color: var(--polidraft-gray);
  font-style: italic;
}

/* Pagination Styles */
.pagination-controls {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.pagination-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--polidraft-border);
  background: white;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  background-color: var(--polidraft-light-gray);
  border-color: var(--polidraft-gray);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.prev-btn {
  color: var(--polidraft-gray);
}

.next-btn {
  background-color: var(--polidraft-blue);
  color: white;
  border-color: var(--polidraft-blue);
}

.next-btn:hover:not(:disabled) {
  background-color: var(--polidraft-blue-hover);
  border-color: var(--polidraft-blue-hover);
}

.page-info {
  font-weight: 500;
  color: var(--polidraft-text-dark);
  min-width: 80px;
  text-align: center;
}

/* Processing Documents Styles */
.loading-spinner {
  width: 4rem;
  height: 4rem;
  border: 4px solid var(--polidraft-border);
  border-top: 4px solid var(--polidraft-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 2rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.progress-step {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
}

.progress-step.active {
  color: var(--polidraft-blue);
  font-weight: bold;
}

.progress-step.completed {
  color: #28a745;
}
