/*
|--------------------------------------------------------------------------
| Commit Card + Webhook Tester Styling Fix
|--------------------------------------------------------------------------
*/

.profile-commit-list {
    display: grid;
    gap: 12px;
}

.profile-commit-row {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center;
    gap: 16px;
    width: 100%;
    min-height: 96px;
    padding: 18px 20px !important;
    border: 1px solid #dfe6ef;
    border-radius: 18px;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
}

.profile-commit-row > div {
    min-width: 0;
}

.profile-commit-row strong {
    display: block;
    font-weight: 950;
    font-size: 1rem;
    margin-bottom: 4px;
    white-space: normal;
}

.profile-commit-row p {
    margin: 0;
    color: #64748b;
    line-height: 1.45;
}

.profile-commit-row small {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    min-width: 70px;
    white-space: nowrap;
}

.commit-type-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 118px;
    max-width: 140px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef0ff;
    color: #5865f2;
    font-size: .78rem;
    font-weight: 950;
    line-height: 1.1;
    text-align: center;
    white-space: normal;
}

.diff-add {
    color: #16a34a;
    font-weight: 950;
}

.diff-remove {
    color: #dc2626;
    font-weight: 950;
}

.webhook-layout {
    align-items: start;
}

.webhook-tester-card {
    overflow: hidden;
}

.webhook-tester-card form {
    display: grid;
    gap: 12px;
}

.webhook-tester-card input,
.webhook-tester-card textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.webhook-tester-card textarea {
    min-height: 220px;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .9rem;
    line-height: 1.5;
}

.webhook-tester-card button[disabled] {
    opacity: .7;
    cursor: wait;
}

.webhook-tester-card pre {
    max-width: 100%;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    border-radius: 16px;
    border: 1px solid #dfe6ef;
    background: #f8fafc;
    padding: 14px;
    margin-top: 14px;
    max-height: 360px;
}

.webhook-output-success {
    border-color: #bbf7d0 !important;
    background: #f0fdf4 !important;
}

.webhook-output-error {
    border-color: #fecaca !important;
    background: #fef2f2 !important;
}

.webhook-event-card details {
    border: 1px solid #e5ebf3;
    border-radius: 14px;
    padding: 10px 12px;
    margin-top: 10px;
}

.webhook-event-card summary {
    cursor: pointer;
    color: #0f172a;
    font-weight: 900;
}

.webhook-event-card details pre {
    margin: 10px 0 0;
    max-height: 280px;
    overflow: auto;
}

@media (max-width: 760px) {
    .profile-commit-row {
        grid-template-columns: 1fr !important;
    }

    .commit-type-pill {
        justify-content: flex-start;
        max-width: none;
        width: fit-content;
    }

    .profile-commit-row small {
        justify-content: flex-start;
    }
}
