/* Custom styles for Právník24.eu */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Prose styling for AI responses */
.prose {
    max-width: none;
}

.prose p {
    margin-bottom: 1em;
}

.prose strong {
    font-weight: 600;
}

.prose ul {
    list-style-type: disc;
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.prose ol {
    list-style-type: decimal;
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.prose li {
    margin-bottom: 0.5em;
}

/* Custom button styles */
.btn-primary {
    @apply bg-blue-600 text-white hover:bg-blue-700 px-4 py-2 rounded-md font-medium transition;
}

.btn-secondary {
    @apply bg-gray-200 text-gray-900 hover:bg-gray-300 px-4 py-2 rounded-md font-medium transition;
}

.btn-danger {
    @apply bg-red-600 text-white hover:bg-red-700 px-4 py-2 rounded-md font-medium transition;
}

/* Card styles */
.card {
    @apply bg-white rounded-lg shadow-md p-6;
}

/* Badge styles */
.badge {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.badge-success {
    @apply bg-green-100 text-green-800;
}

.badge-warning {
    @apply bg-yellow-100 text-yellow-800;
}

.badge-error {
    @apply bg-red-100 text-red-800;
}

.badge-info {
    @apply bg-blue-100 text-blue-800;
}

/* Form styles */
.form-label {
    @apply block text-sm font-medium text-gray-700 mb-1;
}

.form-input {
    @apply mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm;
}

.form-textarea {
    @apply mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm;
}

.form-select {
    @apply mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm;
}

.form-error {
    @apply mt-1 text-sm text-red-600;
}

/* Table styles */
.table {
    @apply min-w-full divide-y divide-gray-200;
}

.table thead {
    @apply bg-gray-50;
}

.table th {
    @apply px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider;
}

.table td {
    @apply px-6 py-4 whitespace-nowrap text-sm text-gray-900;
}

/* Modal overlay */
.modal-overlay {
    @apply fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity z-40;
}

.modal-container {
    @apply fixed inset-0 z-50 overflow-y-auto;
}

.modal-content {
    @apply relative bg-white rounded-lg shadow-xl max-w-lg mx-auto my-8 p-6;
}

/* Tooltip */
.tooltip {
    @apply invisible absolute z-10 py-2 px-3 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 transition-opacity;
}

.tooltip-trigger:hover .tooltip {
    @apply visible opacity-100;
}

/* Print styles */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }

    body {
        background: white;
    }

    .print-full-width {
        max-width: 100% !important;
    }
}

/* Responsive utilities */
@media (max-width: 640px) {
    .mobile-hidden {
        display: none;
    }
}

/* ========== FOOTER - MOBILNÍ VERZE ========== */
@media (max-width: 768px) {
  footer {
    padding: 16px 12px !important;
  }
  
  /* Grid na 1 sloupec, menší mezery */
  footer .grid,
  footer > div > div {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  /* Menší nadpisy */
  footer h3,
  footer h4 {
    font-size: 14px !important;
    margin-bottom: 4px !important;
  }
  
  /* Menší text */
  footer p,
  footer a,
  footer li {
    font-size: 12px !important;
    line-height: 1.4 !important;
    margin-bottom: 2px !important;
  }
  
  /* Menší logo sekce */
  footer img,
  footer .logo-section img {
    width: 40px !important;
    height: 40px !important;
  }
  
  /* Odkazy jako inline seznam */
  footer ul {
    padding: 0 !important;
    margin: 0 !important;
  }
  
  footer ul li {
    padding: 2px 0 !important;
  }
  
  /* Sekce Odkazy, Právní, Kontakt - na řádek vedle sebe */
  footer .grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px 16px !important;
  }
  
  /* Logo sekce přes celou šířku */
  footer .grid > div:first-child {
    grid-column: 1 / -1;
    margin-bottom: 8px;
  }
  
  /* Spodní copyright sekce */
  footer .border-t {
    padding-top: 8px !important;
    margin-top: 8px !important;
  }
  
  footer .border-t p {
    font-size: 11px !important;
  }
  
  /* Menší padding celkově */
  footer .py-8,
  footer .py-12 {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }
  
  footer .px-4,
  footer .px-6 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* ===========================================
   GLOBAL DARK INPUT STYLING
   Ensures consistent dark theme inputs across all pages
   =========================================== */

/* Text inputs, email, password, tel, search */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="search"],
input[type="number"],
textarea,
select {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border: 1px solid #475569 !important;
}

/* Placeholders */
input::placeholder,
textarea::placeholder {
    color: #64748b !important;
}

/* Focus state - cyan ring */
input:focus,
textarea:focus,
select:focus {
    border-color: #06b6d4 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2) !important;
}

/* Disabled inputs */
input:disabled,
textarea:disabled,
select:disabled {
    background-color: #334155 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
}

/* Checkboxes and radio buttons */
input[type="checkbox"],
input[type="radio"] {
    background-color: #1e293b !important;
    border: 1px solid #475569 !important;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background-color: #06b6d4 !important;
    border-color: #06b6d4 !important;
}

/* Fix autofill background color */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #1e293b inset !important;
    -webkit-text-fill-color: #e2e8f0 !important;
    border: 1px solid #475569 !important;
}

/* Document editor - dark theme textarea & title */
#documentContent {
  background-color: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}
#documentContent::placeholder {
  color: #64748b !important;
}
#documentTitle {
  color: #e2e8f0 !important;
}
#documentTitle::placeholder {
  color: #64748b !important;
}
