/* Minimal PrimeVue styles for custom styling with Tailwind */

/* Typography: ensure PrimeVue components inherit Manrope from the app */
:root {
  --font-family: 'Manrope', system-ui, sans-serif;
}

.p-component {
  font-family: var(--font-family) !important;
}

/* Overlay Mask (затемнение фона) */
.p-dialog-mask,
.p-component-overlay {
  background-color: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(2px);
}

/* Dialog */
.p-dialog {
  background: white !important;
  background-color: #ffffff !important;
  border-radius: 1rem !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
  border: none !important;
  overflow: hidden;
}

.p-dialog-header {
  padding: 1.5rem 1.75rem !important;
  background: linear-gradient(to bottom, #ffffff, #f9fafb) !important;
  border-bottom: 1px solid #e5e7eb !important;
}

.p-dialog-title {
  font-weight: 700 !important;
  font-size: 1.375rem !important;
  color: #1f2937 !important;
}

.p-dialog-content {
  padding: 1.75rem !important;
  background: white !important;
  background-color: #ffffff !important;
}

/* Close button */
.p-dialog-header-close {
  width: 2.25rem !important;
  height: 2.25rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0.5rem !important;
  transition: all 0.2s ease !important;
}

.p-dialog-header-close:hover {
  background-color: #f3f4f6 !important;
}

.p-dialog-header-close:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Sidebar / Drawer (PrimeVue v4 uses `.p-drawer*` classes for Sidebar) */
.p-sidebar,
.p-drawer {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-left: 1px solid #e5e7eb !important;
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12) !important;
}

.p-sidebar-header,
.p-drawer-header {
  padding: 1.25rem 1.25rem 1rem !important;
  background: linear-gradient(to bottom, #ffffff, #f9fafb) !important;
  border-bottom: 1px solid #e5e7eb !important;
}

.p-sidebar-content,
.p-drawer-content {
  padding: 1.25rem !important;
  background: #ffffff !important;
}

/* Close button (best-effort for both generations of classnames) */
.p-sidebar-header-close,
.p-drawer-header-close,
.p-drawer-close-button {
  width: 2.25rem !important;
  height: 2.25rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0.5rem !important;
  transition: all 0.2s ease !important;
}

.p-sidebar-header-close:hover,
.p-drawer-header-close:hover,
.p-drawer-close-button:hover {
  background-color: #f3f4f6 !important;
}

.p-sidebar-header-close:focus,
.p-drawer-header-close:focus,
.p-drawer-close-button:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Toast */
.p-toast {
  opacity: 1;
  z-index: 2000 !important; /* keep above fixed header/overlays */
  width: auto !important;
  max-width: calc(100vw - 2rem);
}

.p-toast-top-right {
  top: 1rem !important;
  right: 1rem !important;
}

.p-toast-message {
  border-radius: 0.875rem !important;
  border: none !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16) !important;
  margin: 0.5rem 0;
  overflow: hidden;
  min-width: 18rem;
  max-width: 34rem;
}

.p-toast-message-success {
  background-color: #10b981 !important;
  color: #ffffff !important;
  border-radius: 0.875rem !important;
}

.p-toast-message-error {
  background-color: #ef4444 !important;
  color: #ffffff !important;
  border-radius: 0.875rem !important;
}

.p-toast-message-warn,
.p-toast-message-warning {
  background-color: #f59e0b !important;
  color: #ffffff !important;
  border-radius: 0.875rem !important;
}

.p-toast-message-content {
  display: flex !important;
  align-items: flex-start !important;
  gap: 0.75rem !important;
  padding: 0.875rem 1rem !important;
  /* In PrimeVue v4 the background may need to live on `messagecontent` */
  background-color: inherit !important;
  color: inherit !important;
  border-radius: inherit !important;
  border: none !important;
}

/* Ensure severity background is visible even if PrimeVue renders background on content */
.p-toast-message-success .p-toast-message-content {
  background-color: #10b981 !important;
  color: #ffffff !important;
}

.p-toast-message-error .p-toast-message-content {
  background-color: #ef4444 !important;
  color: #ffffff !important;
}

.p-toast-message-warn .p-toast-message-content,
.p-toast-message-warning .p-toast-message-content {
  background-color: #f59e0b !important;
  color: #ffffff !important;
}

/* Toast typography + controls (PrimeVue common classnames) */
.p-toast-message-icon,
.p-toast-message-content > svg,
.p-toast-message-content > img {
  flex: 0 0 auto;
}

.p-toast-message-icon {
  font-size: 1.25rem !important;
  margin-top: 0.125rem;
}

.p-toast-message-text {
  flex: 1 1 auto;
  min-width: 0;
}

.p-toast-summary {
  display: block;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  margin-bottom: 0.125rem;
}

.p-toast-detail {
  line-height: 1.35 !important;
  opacity: 0.95;
}

.p-toast-icon-close,
.p-toast-close-button {
  flex: 0 0 auto;
  width: 2rem !important;
  height: 2rem !important;
  margin-left: 0.25rem;
  border-radius: 0.625rem !important;
  background: transparent !important;
  border: none !important;
  color: inherit !important;
  opacity: 0.9;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.p-toast-icon-close:hover,
.p-toast-close-button:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  opacity: 1;
}

/* Calendar */
.p-calendar {
  display: inline-block;
}

.p-inputtext {
  width: 100%;
  padding: 0.875rem 1rem !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 0.75rem !important;
  font-size: 0.9375rem !important;
  transition: all 0.2s ease !important;
  background-color: #ffffff !important;
}

.p-inputtext:hover {
  border-color: #94a3b8 !important;
}

.p-inputtext:focus {
  outline: none !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.p-datepicker {
  /* PrimeVue Calendar root wrapper is also `.p-datepicker` (p-inputwrapper).
     We keep the input visual consistent with other fields (no extra shadow). */
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.p-datepicker table {
  width: 100%;
}

.p-datepicker td {
  padding: 0.5rem;
}

/* InputNumber */
.p-inputnumber {
  width: 100%;
}

.p-inputnumber-input {
  width: 100%;
  padding: 0.875rem 1rem !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 0.75rem !important;
  font-size: 0.9375rem !important;
  transition: all 0.2s ease !important;
  background-color: #ffffff !important;
}

.p-inputnumber-input:hover {
  border-color: #94a3b8 !important;
}

.p-inputnumber-input:focus {
  outline: none !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.p-inputnumber-button {
  border-radius: 0.5rem !important;
}

/* Button */
.p-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem !important;
  border-radius: 0.75rem !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
  border: none !important;
  cursor: pointer;
  font-size: 1rem !important;
}

/* Submit button styles (applies to buttons in BookingForm) */
.p-dialog-content .p-button {
  background: #000000 !important;
  color: white !important;
  box-shadow: none !important;
}

.p-dialog-content .p-button:hover:not(:disabled) {
  background: #111111 !important;
  transform: translateY(-1px);
}

.p-dialog-content .p-button:active:not(:disabled) {
  transform: translateY(0);
}

.p-button:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(62, 104, 255, 0.22) !important;
}

.p-button-label {
  font-weight: 600 !important;
}

/* Ripple (PrimeVue) */
.p-ink {
  display: block;
  position: absolute;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 9999px;
  transform: scale(0);
  pointer-events: none;
  opacity: 1;
}

.p-ink-active {
  animation: p-ripple 0.45s linear;
}

@keyframes p-ripple {
  100% {
    opacity: 0;
    transform: scale(2.6);
  }
}

/* Universal Primary CTA (works for PrimeVue Buttons and regular <a>/<button>) */
.btn-primary {
  background: #000000 !important;
  color: #ffffff !important;
  box-shadow: none !important;
  transition: transform 0.2s ease, filter 0.2s ease, background-color 0.2s ease !important;
  will-change: transform;
}

.btn-primary:hover {
  filter: brightness(1.03);
  background: #111111 !important;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Universal Secondary CTA (works for PrimeVue Buttons and regular <a>/<button>) */
.btn-secondary {
  background: #c5d8ff !important;
  color: #000000 !important;
  box-shadow: none !important;
  transition: transform 0.2s ease, filter 0.2s ease, background-color 0.2s ease !important;
  will-change: transform;
}

.btn-secondary:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn-secondary[disabled],
.btn-secondary:disabled,
.btn-secondary[aria-disabled='true'],
.btn-secondary.p-disabled {
  opacity: 0.85;
  cursor: not-allowed;
  transform: none !important;
}

/* PrimeVue button variant support */
.p-button.btn-secondary {
  background: #c5d8ff !important;
  color: #000000 !important;
  box-shadow: none !important;
}

.p-button.btn-secondary:hover:not(:disabled) {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.p-button.btn-secondary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary[disabled],
.btn-primary:disabled,
.btn-primary[aria-disabled='true'],
.btn-primary.p-disabled {
  opacity: 0.85;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-primary .p-button-loading-icon,
.btn-primary .p-button-icon,
.btn-primary svg {
  color: currentColor !important;
}

/* Primary CTA button (Tailwind-friendly) */
.p-button.btn-primary {
  background: #000000 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.p-button.btn-primary:hover:not(:disabled) {
  background: #111111 !important;
  transform: translateY(-1px);
}

.p-button.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.p-button.btn-primary:disabled,
.p-button.btn-primary.p-disabled {
  opacity: 0.85;
  cursor: not-allowed;
  transform: none !important;
}

.p-button.btn-primary .p-button-loading-icon,
.p-button.btn-primary .p-button-icon,
.p-button.btn-primary svg {
  color: currentColor !important;
}

.p-button.btn-primary.p-button-loading .p-button-label {
  opacity: 1 !important;
}

/* Component Focus States */
.p-component:focus {
  outline: none;
}

/* Input Mask */
.p-inputmask {
  width: 100%;
  padding: 0.875rem 1rem !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 0.75rem !important;
  font-size: 0.9375rem !important;
  transition: all 0.2s ease !important;
  background-color: #ffffff !important;
}

.p-inputmask:hover {
  border-color: #94a3b8 !important;
}

.p-inputmask:focus {
  outline: none !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Calendar Overlay */
.p-datepicker-panel {
  background: white !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 0.5rem !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
  padding: 0.5rem !important;
}

/* Ensure all overlays have proper z-index */
.p-dialog-mask {
  z-index: 1100 !important;
}

.p-sidebar-mask,
.p-drawer-mask {
  background-color: rgba(0, 0, 0, 0.4) !important;
  z-index: 1000;
}

/* Global: disable focus outline/highlight for all buttons across the project */
button:focus,
button:focus-visible,
.p-button:focus,
.p-button:focus-visible,
.p-dialog-header-close:focus,
.p-dialog-header-close:focus-visible,
.p-sidebar-header-close:focus,
.p-sidebar-header-close:focus-visible,
.p-drawer-header-close:focus,
.p-drawer-header-close:focus-visible,
.p-drawer-close-button:focus,
.p-drawer-close-button:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
