* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    background: #fff;
    color: #000;
    line-height: 1.6;
}

.card {
    border: 1px solid #ddd;
    background: #fff;
    padding: 24px;
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.section-header p {
    font-size: 13px;
    color: #666;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select {
    border: 1px solid #ccc;
    padding: 10px 12px;
    font-size: 15px;
    height: 44px;
    background: #fff;
}

.form-group input[type="text"]:focus,
.date-field {
    position: relative;
    display: block;
    width: 100%;
}

.form-group .date-display {
    width: 100%;
    cursor: pointer;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.date-picker-native {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
}

.date-picker-native.is-visible {
    position: static;
    width: 100%;
    height: 44px;
    opacity: 1;
    pointer-events: auto;
}

.form-group input[type="date"] {
    cursor: pointer;
}

.form-group input[type="date"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #999;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.04);
}

.helper-text {
    font-size: 12px;
    color: #888;
}

.actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

.feedback {
    min-height: 18px;
    font-size: 13px;
    color: #b42323;
    margin-top: 12px;
}

.feedback.success {
    color: #1a7f37;
}

.result-panel {
    border: 1px solid #eee;
    background: #fafafa;
    padding: 20px;
}

.result-value {
    font-size: 20px;
    font-weight: 600;
    word-break: break-all;
}

.result-meta {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

.history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    border: 1px solid #eee;
    padding: 12px 14px;
    background: #fff;
}

.history-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.history-value {
    font-size: 15px;
    font-weight: 500;
}

@media (max-width: 640px) {
    .card {
        padding: 20px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .actions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .actions-row .btn {
        width: 100%;
    }
}

/* Standard input/result treatment */
.input-card .actions-row {
    margin-top: 24px;
    padding-top: 19px;
    border-top: 1px solid #e5e7eb;
}

.input-card {
    padding-bottom: 24px;
}

.form-group input[type="text"] {
    height: 40px;
}

.feedback:empty {
    display: none;
}

.feedback {
    min-height: 0;
}

.result-card[hidden] {
    display: none;
}

.result-panel {
    border: 0;
    background: #f8f9fb;
    padding: 20px;
}

.result-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.result-row .result-value {
    flex: 0 1 auto;
    min-width: 0;
}

body:not(.ui-editor) .result-row .result-copy {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body:not(.ui-editor) .result-row .result-copy:hover:not(:disabled) {
    border: 0;
    background: #eef0f3;
    color: #111111;
}

body:not(.ui-editor) .result-row .result-copy:disabled {
    border: 0;
    background: transparent;
    color: #c7cbd1;
}

.copy-icon {
    display: inline-flex;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.copy-icon svg {
    width: 100%;
    height: 100%;
}

.history-item {
    border: 0;
    background: #f8f9fb;
}

/* FAQ */
.container {
    padding-bottom: 0;
}


.history-card[hidden] {
    display: none;
}


/* Amount examples */
.examples {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
    color: #8a8f98;
}

.example-tag {
    border: none;
    min-height: auto;
    padding: 0;
    background: transparent;
    font-size: 12px;
    color: #8a8f98;
    cursor: pointer;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration-line: underline;
    text-decoration-style: dashed;
    text-decoration-color: #c7cbd1;
    text-underline-offset: 3px;
}

.example-tag:hover {
    color: #333;
    text-decoration-color: #8a8f98;
}
