/* DELAT 2026 Travel Expense Plugin Styles */

:root {
    --tc-card-background: #ffffff;
    --tc-card-foreground: #0f172a;
    --tc-muted-foreground: #8996a9;
    --tc-border: #e2e8f0;
    --tc-input-background: #ffffff;
    --tc-input-border: #e2e8f0;
    --tc-primary: var(--color_blue_dark);
    --tc-primary-foreground: #ffffff;
    --tc-accent: #f1f5f9;
    --tc-accent-foreground: #0f172a;
    --tc-destructive: #ef4444;
    --tc-ring: rgba(59, 130, 246, 0.5);
}

.travel-expense-container {
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding: 1rem;
}

/* Muted foreground text */
.tc-muted-foreground {
    color: var(--tc-muted-foreground);
}

/* Card Styles */
.tc-card {
    background-color: var(--tc-card-background);
    color: var(--tc-card-foreground);
    border-radius: 0.75rem;
    border: 1px solid var(--tc-border);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.tc-card-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    border: none;
    background: transparent;
}

.tc-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    color: var(--tc-card-foreground);
    padding: 0;
    border: none;
}

.tc-card-description {
    font-size: 0.875rem;
    color: var(--tc-muted-foreground);
    margin: 0;
}

.tc-card-content {
    padding: 0 1.5rem 1.5rem;
}

.tc-space-y-2 > * + * {
    margin-top: 0.5rem;
}

.tc-space-y-4 > * + * {
    margin-top: 1rem;
}

.tc-space-y-6 > * + * {
    margin-top: 1.5rem;
}

/* Form Elements */
.tc-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    user-select: none;
}

.tc-label.cursor-pointer {
    cursor: pointer;
}

.tc-input {
    display: flex;
    height: 2.25rem;
    width: 100%;
    border-radius: 0.375rem;
    border: 1px solid var(--tc-input-border);
    background-color: var(--tc-input-background);
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    color: inherit;
}

.tc-input[type=file]::file-selector-button {
    margin-right: 20px;
    border: none;
    background: var(--tc-input-border);
    padding: 3px 10px;
    border-radius: 5px;
    font-size: smaller;
    color: var(--tc-muted-foreground);
    cursor: pointer;
    transition: background .2s ease-in-out;
    &:hover {
        background: #cccccc;
    }
}

.tc-input:focus-visible {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px var(--tc-ring);
}

.tc-input.is-invalid {
    border-color: var(--tc-destructive);
}

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

.tc-input-readonly {
    color: var(--tc-card-foreground);
    font-weight: 500;
}

.tc-border-b {
    border-bottom: 1px solid var(--tc-border);
}

.tc-pb-2 {
    padding-bottom: 0.5rem;
}

.tc-btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    height: auto;
}

.tc-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 9999px;
    background-color: var(--tc-accent);
    color: var(--tc-accent-foreground);
}

.tc-badge-info {
    background-color: #e0f2fe;
    color: #0369a1;
}

/* Grid Layouts */
.tc-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .tc-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Radio Group */
.tc-radio-group {
    display: flex;
    gap: 1.5rem;
}

.tc-radio-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.tc-radio-button {
    appearance: none;
    width: 1rem;
    height: 1rem;
    border: 1px solid var(--tc-input-border);
    border-radius: 50%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: var(--tc-input-background);
}

.tc-radio-button:checked {
    border-color: var(--tc-primary);
    background-color: var(--tc-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* Calculation Displays */
.tc-calc-box {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tc-calc-box .label {
    font-weight: 500;
    color: #334155;
}

.tc-calc-box .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1d4ed8;
}

.tc-badge-box {
    background-color: #f1f5f9;
    border-radius: 0.5rem;
    padding: 1rem;
}

.tc-badge-box .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

/* Separator */
.tc-separator {
    height: 1px;
    width: 100%;
    background-color: var(--tc-border);
    margin: 1rem 0;
}

/* Buttons */
.tc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    white-space: nowrap;
}

.tc-btn-outline {
    background-color: var(--tc-card-background);
    border-color: var(--tc-input-border);
    color: var(--tc-card-foreground);
    width: 100%;
}

.tc-btn-outline:hover {
    background-color: var(--tc-accent);
    color: var(--tc-accent-foreground);
}

.tc-btn-primary {
    background-color: var(--tc-primary);
    color: var(--tc-primary-foreground);
    width: 100%;
    height: 3rem;
    font-size: 1.125rem;
    border: none;
}

.tc-btn-primary:hover {
    opacity: 0.9;
}

.tc-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tc-btn-ghost {
    background: transparent;
    color: var(--tc-muted-foreground);
    padding: 0.25rem;
}

.tc-btn-ghost:hover {
    color: var(--tc-destructive);
}

/* Custom Repeatable Styles */
.tc-repeatable-item {
    background-color: var(--tc-accent);
    border-radius: 0.5rem;
    padding: 1.5rem 1rem 1rem;
    position: relative;
    margin-bottom: 1rem;
}

.tc-repeatable-remove {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
}

/* Checkbox Styles */
.tc-checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.tc-checkbox {
    appearance: none;
    width: 1rem;
    height: 1rem;
    border: 1px solid var(--tc-input-border);
    border-radius: 4px;
    background-color: var(--tc-input-background);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin: 0;
    top: 2px;
}

.tc-checkbox:checked {
    background-color: var(--tc-primary);
    border-color: var(--tc-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center;
}

/* Summary Box */
.tc-summary-card {
    background: linear-gradient(to bottom right, var(--tc-accent), var(--tc-border));
    border: 2px solid var(--tc-muted-foreground);
    padding: 1.5rem;
    border-radius: 0.75rem;
}

.tc-summary-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tc-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--tc-muted-foreground);
}

.tc-summary-row .label {
    font-weight: 500;
}

.tc-summary-row .value {
    font-weight: 600;
    color: var(--tc-card-foreground);
}

.tc-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
}

.tc-summary-total .label {
    font-size: 1.25rem;
    font-weight: 600;
    color: #334155;
}

.tc-summary-total .value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--tc-primary);
}

.tc-invalid-feedback {
    display: block;
    color: var(--tc-destructive);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Icons */
.tc-icon {
    width: 1.25rem;
    height: 1.25rem;
    display: inline-block;
    vertical-align: middle;
}
