/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@tailwind base;
@tailwind components;
@tailwind utilities;

/* Trix Editor Styles */
@import "trix/dist/trix";

/* Custom Trix Editor Styling to match Tailwind theme */
trix-editor {
  border: 1px solid #d1d5db !important; /* border-gray-300 */
  border-radius: 0.5rem !important; /* rounded-lg */
  padding: 0.75rem 1rem !important; /* px-4 py-3 */
  min-height: 150px !important;
  font-family: inherit !important;
  font-size: 0.875rem !important;
  line-height: 1.25rem !important;
  transition: border-color 0.2s ease !important;
}

trix-editor:focus {
  outline: none !important;
  border-color: #3b82f6 !important; /* border-blue-500 */
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5) !important; /* focus:ring-2 focus:ring-blue-500 */
}

trix-editor.trix-content {
  background-color: white !important;
}

/* Trix toolbar styling */
trix-toolbar {
  border: 1px solid #d1d5db !important;
  border-bottom: none !important;
  border-radius: 0.5rem 0.5rem 0 0 !important;
  background-color: #f9fafb !important; /* bg-gray-50 */
  padding: 0.5rem !important;
}

trix-toolbar .trix-button-group {
  border: none !important;
  background-color: transparent !important;
  margin-right: 0.5rem !important;
}

trix-toolbar .trix-button {
  border: 1px solid #d1d5db !important;
  background-color: white !important;
  border-radius: 0.25rem !important;
  padding: 0.25rem 0.5rem !important;
  margin: 0 0.125rem !important;
  color: #374151 !important; /* text-gray-700 */
  font-size: 0.75rem !important;
  transition: all 0.2s ease !important;
}

trix-toolbar .trix-button:hover {
  background-color: #f3f4f6 !important; /* hover:bg-gray-100 */
  border-color: #9ca3af !important;
}

trix-toolbar .trix-button.trix-active {
  background-color: #3b82f6 !important; /* bg-blue-500 */
  color: white !important;
  border-color: #3b82f6 !important;
}

/* Hide file upload button since we're focusing on text editing */
trix-toolbar .trix-button--icon-attach {
  display: none !important;
}

/* Trix editor content styling - these make the formatting visible in the editor */
trix-editor h1 {
  font-size: 1.5em !important;
  font-weight: bold !important;
  line-height: 1.2 !important;
  margin: 0.5em 0 !important;
}

trix-editor blockquote {
  border: 0 solid #ccc !important;
  border-left-width: 0.3em !important;
  margin-left: 0.3em !important;
  padding-left: 0.6em !important;
  color: #666 !important;
  font-style: italic !important;
}

trix-editor pre {
  display: inline-block !important;
  width: 100% !important;
  font-family: 'Courier New', Courier, monospace !important;
  font-size: 0.9em !important;
  padding: 0.5em !important;
  background-color: #f5f5f5 !important;
  border: 1px solid #ddd !important;
  border-radius: 0.25rem !important;
  white-space: pre-wrap !important;
  margin: 0.25em 0 !important;
}

trix-editor ul {
  list-style-type: disc !important;
  margin: 0.5em 0 !important;
  padding-left: 1.5em !important;
}

trix-editor ol {
  list-style-type: decimal !important;
  margin: 0.5em 0 !important;
  padding-left: 1.5em !important;
}

trix-editor li {
  margin: 0.25em 0 !important;
  padding-left: 0.25em !important;
}

/* Nested list indentation */
trix-editor ul ul,
trix-editor ol ol,
trix-editor ul ol,
trix-editor ol ul {
  margin: 0.25em 0 !important;
  padding-left: 1.5em !important;
}

/* Link styling in Trix editor */
trix-editor a {
  color: #3b82f6 !important; /* text-blue-500 */
  text-decoration: underline !important;
  cursor: pointer !important;
}

trix-editor a:hover {
  color: #1d4ed8 !important; /* text-blue-700 */
  text-decoration: underline !important;
}

/* ActionText content styling for display (job show page, etc.) */
.trix-content a {
  color: #3b82f6;
  text-decoration: underline;
  cursor: pointer;
}

.trix-content a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.trix-content h1 {
  font-size: 1.5em;
  font-weight: bold;
  line-height: 1.2;
  margin: 0.5em 0;
}

.trix-content blockquote {
  border: 0 solid #ccc;
  border-left-width: 0.3em;
  margin-left: 0.3em;
  padding-left: 0.6em;
  color: #666;
  font-style: italic;
}

.trix-content pre {
  display: inline-block;
  width: 100%;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
  padding: 0.5em;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  white-space: pre-wrap;
  margin: 0.25em 0;
}

.trix-content ul {
  list-style-type: disc;
  margin: 0.5em 0;
  padding-left: 1.5em;
}

.trix-content ol {
  list-style-type: decimal;
  margin: 0.5em 0;
  padding-left: 1.5em;
}

.trix-content li {
  margin: 0.25em 0;
  padding-left: 0.25em;
}

/* Custom styles for Tailwind components can go here */

/* Mobile navigation - ensure it never shows on desktop */
@media (min-width: 640px) {
  .mobile-nav-menu {
    display: none !important;
  }
}

/* Edit button styles */
.edit-button {
  background-color: #2563eb;
  color: white;
  padding: 0.75rem;
  border-radius: 0.375rem;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s ease;
  font-weight: 500;
  width: 2.5rem;
  height: 2.5rem;
  text-align: center;
}

.edit-button:hover {
  background-color: #1d4ed8;
}

.edit-icon {
  width: 1rem;
  height: 1rem;
  display: block;
  margin: 0 auto;
}

/* Edit profile button */
.edit-profile-container {
  display: flex;
  justify-content: center;
}

.edit-profile-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #2563eb;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: background-color 0.2s ease;
  font-weight: 500;
  width: 100%;
  justify-content: center;
}

.edit-profile-button:hover {
  background-color: #1d4ed8;
}

.edit-profile-icon {
  width: 1rem;
  height: 1rem;
}

/* Desktop styles - half width */
@media (min-width: 768px) {
  .edit-profile-button {
    width: 50%;
  }
}

/* Danger zone buttons */
.danger-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
  text-align: center;
  width: 100%;
  max-width: 100%;
}

.danger-button:last-child {
  margin-bottom: 0;
}

.danger-button a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.danger-button:hover {
  transform: translateY(-1px);
}

/* Sign out button */
.sign-out-button {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
}

.sign-out-button:hover {
  background-color: #fee2e2;
}

/* Deactivate button */
.deactivate-button {
  background-color: #fffbeb;
  border: 1px solid #fed7aa;
}

.deactivate-button:hover {
  background-color: #fef3c7;
}

/* Export button */
.export-button {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
}

.export-button:hover {
  background-color: #dbeafe;
}

/* Delete button */
.delete-button {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
}

.delete-button:hover {
  background-color: #fee2e2;
}

/* Desktop styles - full width since buttons are in smaller container */
@media (min-width: 768px) {
  .danger-button {
    width: 100%;
  }
}

/* Account page layout */
.account-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.account-info-section {
  flex: 1;
}

.account-actions-section {
  flex: 1;
}

/* Desktop layout - side by side */
@media (min-width: 1024px) {
  .account-layout {
    flex-direction: row;
    gap: 2rem;
    align-items: flex-start;
  }
  
  .account-info-section {
    flex: 2;
  }
  
  .account-actions-section {
    flex: 1;
    min-width: 350px;
  }
}

/* Cookie Notice Styles */
#cookie-notice {
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
}

#cookie-notice.show {
  transform: translateY(0);
}

/* Ensure cookie notice is above other elements */
#cookie-notice {
  z-index: 9999;
}
