body.pco-pledge-modal-page {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background: rgba(32, 32, 32, 0.6);
}

.pco-pledge-modal,
.pco-pledge-modal h1,
.pco-pledge-modal label,
.pco-pledge-modal input,
.pco-pledge-modal select,
.pco-pledge-modal button {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.pco-pledge-modal *,
.pco-pledge-modal *::before,
.pco-pledge-modal *::after {
    box-sizing: border-box;
}

.pco-pledge-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(32, 32, 32, 0.6);
    z-index: 9999;
    overflow-y: auto;
}

body.pco-pledge-modal-page .pco-pledge-backdrop,
.pco-pledge-backdrop.is-open {
    display: flex;
}

body.pco-pledge-open {
    overflow: hidden;
}

.pco-pledge-modal {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    padding: 28px 26px 24px;
    position: relative;
}

.pco-pledge-close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
    color: #666;
}

#pledge-title {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 600;
    color: #2b2f33;
}

.pco-pledge-amount {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    border-bottom: 2px solid #e0e3e7;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.pco-pledge-amount .currency {
    font-size: 28px;
    color: #9aa0a6;
}

.pco-pledge-amount input {
    border: none;
    font-size: 48px;
    font-weight: 500;
    width: 100%;
    outline: none;
    color: #2b2f33;
}

.pco-pledge-label {
    display: block;
    margin: 16px 0 6px;
    font-weight: 600;
    color: #2b2f33;
}

.pco-pledge-select select,
.pco-pledge-modal input[type="text"],
.pco-pledge-modal input[type="tel"],
.pco-pledge-modal input[type="number"] {
    width: 100%;
    border: 1px solid #d9dde2;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 16px;
    outline: none;
}

.pco-pledge-select select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #889097 50%),
        linear-gradient(135deg, #889097 50%, transparent 50%);
    background-position: calc(100% - 18px) 18px, calc(100% - 12px) 18px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.pco-pledge-frequency {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.pco-pledge-frequency .pill {
    flex: 1 1 30%;
    padding: 8px 0;
    border-radius: 999px;
    border: 1px solid #d9dde2;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    color: #5f6368;
}

.pco-pledge-frequency .pill.active {
    border-color: #0e8f84;
    color: #0e8f84;
    box-shadow: inset 0 0 0 1px #0e8f84;
}

.pco-pledge-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f4f7f9;
    padding: 10px 14px;
    border-radius: 12px;
    margin-top: 16px;
    font-weight: 600;
    color: #2b2f33;
}

.pco-pledge-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pco-pledge-grid > div {
    min-width: 0;
}

.pco-pledge-submit {
    width: 100%;
    margin-top: 18px;
    border: none;
    border-radius: 999px;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(90deg, #3d8ef5 0%, #2bb673 100%);
}

.pco-pledge-submit[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.pco-pledge-message {
    min-height: 18px;
    margin-top: 12px;
    font-size: 14px;
    color: #b02a37;
}

.pco-pledge-message.success {
    color: #177356;
}

.pco-pledge-message.info {
    color: #2b2f33;
}

.pco-pledge-existing {
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #e0e3e7;
    background: #f6f8fa;
}

.pco-pledge-existing-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: #2b2f33;
}

.pco-pledge-existing-actions {
    display: grid;
    gap: 8px;
}

.pco-pledge-option {
    width: 100%;
    border-radius: 999px;
    border: 1px solid #d0d5da;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: #ffffff;
    color: #2b2f33;
}

.pco-pledge-option.primary {
    border-color: #0e8f84;
    background: #0e8f84;
    color: #ffffff;
}

.pco-pledge-option.secondary {
    background: #eef1f3;
}

.pco-pledge-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 540px) {
    .pco-pledge-modal {
        padding: 22px;
    }

    .pco-pledge-grid {
        grid-template-columns: 1fr;
    }
}
