/* Velora Luxe - Premium UI Components */

/* === BUTTONS === */

.btn-luxe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-size: var(--t-sm);
  font-weight: var(--font-medium);
  line-height: var(--leading-tight);
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--dur-2) var(--ease);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
  min-height: 44px; /* Touch target */
;}

.btn-luxe:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
;}

.btn-luxe:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
;}

/* Primary Button */
.btn-luxe-primary {
  background-color: var(--accent-500);
  color: var(--brand-900);
  border-color: var(--accent-500);
  box-shadow: var(--shadow-sm);
;}

.btn-luxe-primary:hover:not(:disabled) {
  background-color: var(--accent-600);
  border-color: var(--accent-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
;}

.btn-luxe-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
;}

/* Secondary Button */
.btn-luxe-secondary {
  background-color: transparent;
  color: var(--accent-500);
  border-color: var(--accent-500);
;}

.btn-luxe-secondary:hover:not(:disabled) {
  background-color: var(--accent-500);
  color: var(--brand-900);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
;}

/* Ghost Button */
.btn-luxe-ghost {
  background-color: transparent;
  color: var(--fg);
  border-color: var(--line);
;}

.btn-luxe-ghost:hover:not(:disabled) {
  background-color: var(--bg-soft);
  border-color: var(--line-soft);
  transform: translateY(-1px);
;}

/* Destructive Button */
.btn-luxe-destructive {
  background-color: var(--error-500);
  color: white;
  border-color: var(--error-500);
  box-shadow: var(--shadow-sm);
;}

.btn-luxe-destructive:hover:not(:disabled) {
  background-color: var(--error-600);
  border-color: var(--error-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
;}

/* Button Sizes */
.btn-luxe-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--t-xs);
  min-height: 36px;
;}

.btn-luxe-lg {
  padding: var(--space-4) var(--space-6);
  font-size: var(--t-md);
  min-height: 52px;
;}

.btn-luxe-xl {
  padding: var(--space-5) var(--space-8);
  font-size: var(--t-lg);
  min-height: 60px;
;}

/* === CARDS === */

.card-luxe {
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--dur-2) var(--ease);
  overflow: hidden;
;}

.card-luxe:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--line-soft);
;}

.card-luxe-header {
  padding: var(--space-5);
  border-bottom: 1px solid var(--line);
  background-color: var(--panel);
;}

.card-luxe-body {
  padding: var(--space-5);
;}

.card-luxe-footer {
  padding: var(--space-5);
  border-top: 1px solid var(--line);
  background-color: var(--panel);
;}

.card-luxe-title {
  font-size: var(--t-lg);
  font-weight: var(--font-semibold);
  color: var(--fg);
  margin: 0 0 var(--space-2) 0;
  line-height: var(--leading-tight);
;}

.card-luxe-subtitle {
  font-size: var(--t-sm);
  color: var(--muted);
  margin: 0;
  line-height: var(--leading-normal);
;}

/* === FORMS === */

.form-group-luxe {
  margin-bottom: var(--space-5);
;}

.form-label-luxe {
  display: block;
  font-size: var(--t-sm);
  font-weight: var(--font-medium);
  color: var(--fg);
  margin-bottom: var(--space-2);
  line-height: var(--leading-tight);
;}

.form-input-luxe {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--t-md);
  line-height: var(--leading-normal);
  color: var(--fg);
  background-color: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all var(--dur-2) var(--ease);
  min-height: 44px; /* Touch target */
;}

.form-input-luxe:focus {
  outline: none;
  border-color: var(--accent-500);
  box-shadow: 0 0 0 3px var(--ring-soft);
  background-color: var(--panel);
;}

.form-input-luxe:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: var(--bg);
;}

.form-input-luxe::placeholder {
  color: var(--muted);
;}

.form-input-luxe:invalid {
  border-color: var(--error-500);
;}

.form-input-luxe:invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
;}

.form-textarea-luxe {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
;}

.form-select-luxe {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23a6b0c3' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right var(--space-3) center;
  background-repeat: no-repeat;
  background-size: 16px 12px;
  padding-right: var(--space-10);
  appearance: none;
;}

.form-checkbox-luxe {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background-color: var(--bg-soft);
  cursor: pointer;
  transition: all var(--dur-2) var(--ease);
  appearance: none;
  position: relative;
;}

.form-checkbox-luxe:checked {
  background-color: var(--accent-500);
  border-color: var(--accent-500);
;}

.form-checkbox-luxe:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 6px;
  height: 10px;
  border: solid var(--brand-900);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
;}

.form-radio-luxe {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background-color: var(--bg-soft);
  cursor: pointer;
  transition: all var(--dur-2) var(--ease);
  appearance: none;
  position: relative;
;}

.form-radio-luxe:checked {
  background-color: var(--accent-500);
  border-color: var(--accent-500);
;}

.form-radio-luxe:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: var(--brand-900);
  transform: translate(-50%, -50%);
;}

.form-error {
  color: var(--error-500);
  font-size: var(--t-xs);
  margin-top: var(--space-1);
  display: flex;
  align-items: center;
  gap: var(--space-1);
;}

.form-help {
  color: var(--muted);
  font-size: var(--t-xs);
  margin-top: var(--space-1);
;}

/* === TABLES === */

.table-luxe {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
;}

.table-luxe th {
  background-color: var(--panel);
  color: var(--fg);
  font-weight: var(--font-semibold);
  font-size: var(--t-sm);
  padding: var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: var(--z-10);
;}

.table-luxe td {
  color: var(--fg);
  padding: var(--space-4);
  border-bottom: 1px solid var(--line-soft);
  transition: background-color var(--dur-2) var(--ease);
;}

.table-luxe tbody tr:hover {
  background-color: var(--bg-soft);
;}

.table-luxe tbody tr:last-child td {
  border-bottom: none;
;}

/* Table Density */
.table-luxe-compact th,
.table-luxe-compact td {
  padding: var(--space-2) var(--space-3);
;}

.table-luxe-comfortable th,
.table-luxe-comfortable td {
  padding: var(--space-5) var(--space-4);
;}

/* === MODALS === */

.modal-luxe {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: all var(--dur-3) var(--ease);
  backdrop-filter: var(--backdrop-blur);
;}

.modal-luxe.show {
  opacity: 1;
  visibility: visible;
;}

.modal-luxe-dialog {
  background-color: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform var(--dur-3) var(--ease);
;}

.modal-luxe.show .modal-luxe-dialog {
  transform: scale(1);
;}

.modal-luxe-header {
  padding: var(--space-5);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
;}

.modal-luxe-title {
  font-size: var(--t-xl);
  font-weight: var(--font-semibold);
  color: var(--fg);
  margin: 0;
  line-height: var(--leading-tight);
;}

.modal-luxe-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: var(--t-xl);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius);
  transition: all var(--dur-2) var(--ease);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
;}

.modal-luxe-close:hover {
  color: var(--fg);
  background-color: var(--bg-soft);
;}

.modal-luxe-body {
  padding: var(--space-5);
;}

.modal-luxe-footer {
  padding: var(--space-5);
  border-top: 1px solid var(--line);
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
;}

/* === DRAWERS === */

.drawer-luxe {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  height: 100%;
  background-color: var(--card);
  box-shadow: var(--shadow-2xl);
  z-index: var(--z-modal);
  transform: translateX(100%);
  transition: transform var(--dur-3) var(--ease);
  display: flex;
  flex-direction: column;
;}

.drawer-luxe.show {
  transform: translateX(0);
;}

.drawer-luxe-header {
  padding: var(--space-5);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
;}

.drawer-luxe-title {
  font-size: var(--t-lg);
  font-weight: var(--font-semibold);
  color: var(--fg);
  margin: 0;
;}

.drawer-luxe-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: var(--t-lg);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius);
  transition: all var(--dur-2) var(--ease);
;}

.drawer-luxe-close:hover {
  color: var(--fg);
  background-color: var(--bg-soft);
;}

.drawer-luxe-body {
  padding: var(--space-5);
  flex: 1;
  overflow-y: auto;
;}

.drawer-luxe-footer {
  padding: var(--space-5);
  border-top: 1px solid var(--line);
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  flex-shrink: 0;
;}

/* === TOASTS === */

.toast-luxe {
  position: fixed;
  top: var(--space-5);
  right: var(--space-5);
  background-color: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-4);
  max-width: 400px;
  z-index: var(--z-toast);
  transform: translateX(100%);
  transition: transform var(--dur-3) var(--ease);
;}

.toast-luxe.show {
  transform: translateX(0);
;}

.toast-luxe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
;}

.toast-luxe-title {
  font-weight: var(--font-semibold);
  color: var(--fg);
  margin: 0;
  font-size: var(--t-sm);
;}

.toast-luxe-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  transition: all var(--dur-2) var(--ease);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
;}

.toast-luxe-close:hover {
  color: var(--fg);
  background-color: var(--bg-soft);
;}

.toast-luxe-body {
  color: var(--muted);
  font-size: var(--t-sm);
  line-height: var(--leading-normal);
;}

/* Toast Variants */
.toast-luxe-success {
  border-left: 4px solid var(--success-500);
;}

.toast-luxe-warning {
  border-left: 4px solid var(--warning-500);
;}

.toast-luxe-error {
  border-left: 4px solid var(--error-500);
;}

.toast-luxe-info {
  border-left: 4px solid var(--info-500);
;}

/* === BADGES === */

.badge-luxe {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--t-xs);
  font-weight: var(--font-medium);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  line-height: var(--leading-none);
;}

.badge-luxe-primary {
  background-color: var(--accent-100);
  color: var(--accent-700);
;}

.badge-luxe-secondary {
  background-color: var(--bg-soft);
  color: var(--muted);
  border: 1px solid var(--line);
;}

.badge-luxe-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success-600);
;}

.badge-luxe-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning-600);
;}

.badge-luxe-error {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--error-600);
;}

.badge-luxe-info {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--info-600);
;}

/* === LOADING STATES === */

.skeleton-luxe {
  background: linear-gradient(90deg, 
    var(--bg-soft) 25%, 
    var(--panel) 50%, 
    var(--bg-soft) 75%
  );
  background-size: 200% 100%;
  animation: shimmer var(--dur-5) infinite;
  border-radius: var(--radius);
;}

.skeleton-luxe-text {
  height: 1em;
  margin-bottom: var(--space-2);
;}

.skeleton-luxe-title {
  height: 1.5em;
  width: 60%;
  margin-bottom: var(--space-4);
;}

.skeleton-luxe-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
;}

.skeleton-luxe-button {
  height: 44px;
  width: 120px;
  border-radius: var(--radius);
;}

.skeleton-luxe-card {
  height: 200px;
  border-radius: var(--radius-lg);
;}

/* === EMPTY STATES === */

.empty-state-luxe {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--muted);
;}

.empty-state-luxe-icon {
  font-size: var(--t-4xl);
  margin-bottom: var(--space-4);
  opacity: 0.5;
  color: var(--accent-500);
;}

.empty-state-luxe-title {
  font-size: var(--t-xl);
  font-weight: var(--font-semibold);
  color: var(--fg);
  margin-bottom: var(--space-2);
  line-height: var(--leading-tight);
;}

.empty-state-luxe-description {
  font-size: var(--t-md);
  margin-bottom: var(--space-6);
  line-height: var(--leading-relaxed);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
;}

/* === NAVIGATION === */

.nav-luxe {
  display: flex;
  align-items: center;
  gap: var(--space-2);
;}

.nav-link-luxe {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--radius);
  transition: all var(--dur-2) var(--ease);
  position: relative;
  font-weight: var(--font-medium);
  font-size: var(--t-sm);
;}

.nav-link-luxe:hover {
  color: var(--fg);
  background-color: var(--bg-soft);
  transform: translateY(-1px);
;}

.nav-link-luxe.active {
  color: var(--accent-500);
  background-color: var(--accent-50);
;}

.nav-link-luxe.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background-color: var(--accent-500);
  border-radius: var(--radius-pill);
;}

/* === RESPONSIVE UTILITIES === */

@media (max-width: 768px) {
  .btn-luxe {
    padding: var(--space-3) var(--space-4);
    font-size: var(--t-sm);
  ;}
  
  .card-luxe-header,
  .card-luxe-body,
  .card-luxe-footer {
    padding: var(--space-4);
  ;}
  
  .modal-luxe-dialog {
    width: 95%;
    margin: var(--space-4);
  ;}
  
  .modal-luxe-header,
  .modal-luxe-body,
  .modal-luxe-footer {
    padding: var(--space-4);
  ;}
  
  .drawer-luxe {
    width: 100%;
  ;}
  
  .toast-luxe {
    top: var(--space-4);
    right: var(--space-4);
    left: var(--space-4);
    max-width: none;
  }
}