/* 
  Component Patterns
  ---------------------------------------------------------
  Abstracted UI patterns that can be used via @apply or HTML classes.
  Designed to work with UnoCSS attributify mode or standard classes.
*/

/* --- Layer: Layout & Containers --- */

/* Standard Card */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-5);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
    border-color: var(--border-hover);
}

/* --- Layer: Interactive --- */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    padding: var(--spacing-2) var(--spacing-4);
    border-radius: var(--radius-lg);
    font-weight: 500;
    font-size: 0.875rem;
    /* 14px */
    transition: all 0.2s ease;
    white-space: nowrap;
}

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

.btn:active {
    transform: scale(0.98);
}

/* Button Variants */
.btn-primary {
    background-color: var(--primary-default);
    color: #ffffff;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.btn-secondary {
    background-color: var(--bg-card);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-hover);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.btn-icon-only {
    padding: var(--spacing-2);
    border-radius: var(--radius-full);
}

/* --- Layer: Form Elements --- */

.input {
    width: 100%;
    padding: 0.625rem 1rem;
    background-color: var(--bg-page);
    /* or soft white */
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.input:focus {
    border-color: var(--primary-default);
    box-shadow: 0 0 0 2px var(--primary-light);
}

/* --- Layer: Data Display --- */

/* Tag / Badge / Pill */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    /* 12px */
    font-weight: 600;
    line-height: 1.25;
    background-color: var(--bg-active);
    color: var(--text-primary);
}

.tag-primary {
    background-color: var(--primary-light);
    color: var(--primary-text);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.tag-success {
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--palette-green-500);
}

.tag-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--palette-red-500);
}

/* --- Layer: Feedback --- */

/* Dialog / Modal Override (matches existing style preference) */
.dialog-content {
    background-color: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--shadow-dialog);
    padding: var(--spacing-6);
    border: 1px solid var(--border-default);
}