/* Primary button - fallback for use outside the Bricks wrapper.
   Deliberately NOT !important: the Bricks Shortcode Wrapper element's own
   rules (and any Bricks/theme CSS) must be able to win. Colours read from the
   same CSS variables the wrapper sets, so the element controls still apply. */
.wmd-btn-primary {
    background-color: var(--wmd-button-bg, #453a8a);
    color: var(--wmd-button-text, #ffffff);
    border: none;
}

.wmd-btn-primary:hover {
    background-color: var(--wmd-button-hover-bg, #ada5d0);
    color: var(--wmd-button-hover-text, #ffffff);
}

/* Progress bar */
.why-me-progress .progress-bar {
    background: var(--wmd-progress-bar-bg, #f0f0f0);
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.why-me-progress .progress-fill {
    background: linear-gradient(90deg, var(--wmd-progress-gradient-start, #667eea) 0%, var(--wmd-progress-gradient-end, #764ba2) 100%);
    height: 100%;
    transition: width 0.3s ease;
}

/* Progress bar - used in my-fundraisers tab cards */
.wmd-progress-bar {
    background: var(--wmd-progress-bar-bg, #f0f0f0);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.wmd-progress-fill {
    background: linear-gradient(90deg, var(--wmd-progress-gradient-start, #667eea) 0%, var(--wmd-progress-gradient-end, #764ba2) 100%);
    height: 100%;
    transition: width 0.3s ease;
}

/* Donation Form Styles */
.wmd-donation-form {
    /* max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px; */

	/* display: flex;
	max-width: 486px;
	padding: 64px 24px;
	flex-direction: column;
	align-items: center;
	gap: 64px;
	border-radius: 32px;
	background: #FFF;
	border: 1px solid red; */
}

.donate-button {
	display: flex;
	padding: 16px 40px;
	justify-content: center;
	align-items: center;
	gap: 8px;
	align-self: stretch;
	border-radius: 40px;
	background: #203D79;
}

.donation-section {
    margin-bottom: 30px;
}

.donation-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

/* Amount Buttons */
.amount-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.amount-option {
    position: relative;
    cursor: pointer;
}

.amount-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.amount-option .amount-label {
    display: block;
    padding: 15px;
    text-align: center;
    background: var(--wmd-button-bg, #ffffff);
    color: var(--wmd-button-text, inherit);
    border: 2px solid var(--wmd-button-bg, #dddddd);
    border-radius: var(--wmd-button-radius, 4px);
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Selected amount. Falls back to the generic hover colours so sites that only
   set "Button hover" in Bricks keep the look they had before the dedicated
   "Selected amount" controls existed. */
.amount-option input[type="radio"]:checked + .amount-label {
    background: var(--wmd-amount-selected-bg, var(--wmd-button-hover-bg, #2271b1));
    border-color: var(--wmd-amount-selected-border, var(--wmd-amount-selected-bg, var(--wmd-button-hover-bg, #2271b1)));
    color: var(--wmd-amount-selected-text, var(--wmd-button-hover-text, #ffffff));
}

.amount-option:hover .amount-label {
    background: var(--wmd-button-hover-bg, var(--wmd-button-bg, #ffffff));
    color: var(--wmd-button-hover-text, var(--wmd-button-text, inherit));
    border-color: var(--wmd-button-hover-bg, #2271b1);
}

/* Custom Amount Field */
.custom-amount-field {
    margin-top: 15px;
}

.custom-amount-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.custom-amount-field input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* Form Fields */
.wmd-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.wmd-form-group {
    margin-bottom: 15px;
}

.wmd-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.wmd-form-group .required {
    color: #e74c3c;
}

.wmd-form-group input[type="text"],
.wmd-form-group input[type="email"],
.wmd-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.wmd-form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.checkbox-field label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.checkbox-field input[type="checkbox"] {
    margin-right: 8px;
}

/* Dedication ("in honor / in memory of") block */
.wmd-dedication-fields {
    margin-bottom: var(--wmd-field-spacing, 15px);
    padding-left: 15px;
    border-left: 3px solid var(--wmd-primary-color, #453a8a);
}

.wmd-dedication-fields h4 {
    margin-bottom: 4px;
}

.wmd-field-note {
    margin: 0 0 12px;
    font-size: 0.85em;
    opacity: 0.75;
}

/* Submit Button */
.donation-submit {
    text-align: center;
}

.donate-button {
    background: #2271b1;
    color: white;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.donate-button:hover {
    background: #135e96;
}

.donate-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Errors */
.donation-errors {
    margin-top: 20px;
    padding: 15px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #c00;
}

.why-me-error {
    padding: 15px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #c00;
    margin: 20px 0;
}

.wmd-form-row {
	display: flex;
	gap: 15px;
	margin-bottom: 15px;
}

.wmd-form-col-6 {
	flex: 1;
	min-width: 0;
}

a.share-btn {
    color: white !important;
}

/* TEMP */
/* Account dashboard tabs.
   Every nav item carries .wmd-tab-link (the "Create Fundraiser" item also keeps
   the legacy .wmd-tab class, so existing custom CSS keeps working).
   NOTHING else is declared here on purpose: sites style this nav with their own
   rules like `.wmd-tabs-nav a { background-color: ... }`, and anything the plugin
   sets on `.wmd-tabs-nav .wmd-tab-link` (0,2,0) would outrank them (0,1,1).
   The Bricks "Account Tabs" controls paint these links instead, and only when set. */
.wmd-tab-link {
	display: block;
}

.wmd-success {
	color: green;
}

.wmd-error {
	color: red;
}

/* Upcoming Fundraisers */
.wmd-upcoming-fundraisers {
    margin: 40px 0;
}

/* Grid Layout (default) */
.wmd-layout-grid .wmd-fundraisers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* List Layout */
.wmd-layout-list .wmd-fundraisers-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.wmd-layout-list .wmd-fundraiser-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
}

/* Fundraiser Card */
.wmd-fundraiser-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.wmd-fundraiser-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wmd-fundraiser-image {
    width: 100%;
    overflow: hidden;
}

.wmd-fundraiser-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wmd-fundraiser-card:hover .wmd-fundraiser-image img {
    transform: scale(1.05);
}

.wmd-fundraiser-content {
    padding: 20px;
}

.wmd-fundraiser-title {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.3;
}

.wmd-fundraiser-title a {
    color: #333;
    text-decoration: none;
}

.wmd-fundraiser-title a:hover {
    color: #2c5a4a;
}

.wmd-fundraiser-excerpt {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.wmd-campaign-count {
    color: #888;
    font-size: 14px;
    margin-bottom: 15px;
}

.wmd-fundraiser-progress {
    margin: 20px 0;
}

.wmd-progress-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.wmd-raised {
    color: #2c5a4a;
}

.wmd-goal {
    color: #888;
}

.wmd-progress-percentage {
    margin-top: 8px;
    font-size: 14px;
    color: #666;
    text-align: right;
}

.wmd-fundraiser-actions {
    margin-top: 20px;
}

.wmd-no-fundraisers {
    text-align: center;
    padding: 40px;
    color: #888;
}

/* Fundraiser Children - Horizontal Card Stack */
.fundraiser-children-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin: 2rem 0;
}

.child-card-horizontal {
    display: flex;
    border: 3px solid var(--wmd-children-border-color, #203D79);
    border-radius: 8px;
    overflow: hidden;
    height: 200px;
}

.child-card-horizontal .child-image {
    width: 200px;
    min-width: 200px;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.child-card-horizontal .child-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.child-card-horizontal .child-info {
    flex: 1;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.child-card-horizontal .child-info h3 {
    margin: 0 0 0.5rem;
    font-weight: 700;
    font-style: italic;
    color: var(--wmd-children-title-color, #203D79);
    font-size: var(--wmd-children-title-font-size, 1.1rem);
}

.child-card-horizontal .wmd-children-stat {
    margin: 0.15rem 0;
    font-size: 0.95rem;
    color: #333;
}

.child-card-horizontal .progress-bar {
    height: 8px;
    background: var(--wmd-progress-bar-bg, #f0f0f0);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.child-card-horizontal .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--wmd-progress-gradient-start, #667eea) 0%, var(--wmd-progress-gradient-end, #764ba2) 100%);
    transition: width 0.3s;
}

.child-card-button {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.5rem 1.25rem;
    background: var(--wmd-children-button-bg, #C5941C);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    align-self: flex-start;
}

.child-card-button:hover {
    opacity: 0.9;
    color: #fff;
}

@media (max-width: 600px) {
    .child-card-horizontal {
        flex-direction: column;
        height: auto;
    }

    .child-card-horizontal .child-image {
        width: 100%;
        min-width: unset;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

/* Account Settings - Toggle Edit */
.wmd-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.wmd-section-header h4 {
    margin: 0;
    font-size: 18px;
}

.wmd-edit-link {
    color: #2c5a4a;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.wmd-edit-link:hover {
    text-decoration: underline;
}

/* Display Mode (Read-only) */
.wmd-profile-display {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.wmd-display-field {
    margin-bottom: 20px;
}

.wmd-display-field:last-child {
    margin-bottom: 0;
}

.wmd-display-field label {
    display: block;
    font-weight: 500;
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wmd-display-field p {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.wmd-display-field em {
    color: #999;
}

/* Edit Mode Form Actions */
.wmd-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.wmd-form-actions .wmd-btn {
    padding: 12px 24px;
}

/* Form row for first/last name */
.wmd-form-group .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.payment-method-option {
	display: flex !important;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	padding: 8px 0;
}

.payment-method-option input[type="radio"] {
	position: static;
	opacity: 1;
	width: auto;
	height: auto;
	margin: 0;
	cursor: pointer;
}

button.wmd-btn.wmd-btn-secondary.wmd-prev-step {
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .wmd-layout-grid .wmd-fundraisers-grid {
        grid-template-columns: 1fr;
    }

    .wmd-layout-list .wmd-fundraiser-card {
        grid-template-columns: 1fr;
    }

	.wmd-form-group .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .wmd-form-row {
        grid-template-columns: 1fr;
    }

    .amount-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Google Pay Button Styling */
#google-pay-button-container {
    max-width: 400px;
    margin: 20px auto;
}

#google-pay-button-container button {
    width: 100% !important;
}

/* Payment Method Card Styling - simplified to plain text */
.payment-method-card {
    min-height: auto;
    display: flex;
    align-items: center;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.payment-method-option input[type="radio"]:checked + .payment-method-card {
    background: transparent;
    border: none;
}

.payment-label {
    font-size: 14px;
    color: #333;
}

/* ==========================================================================
   Bricks Builder Preview Styles
   ========================================================================== */

.wmd-preview-badge {
    background: #f5f5f5;
    color: #666;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 500;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    border-radius: 3px;
    border: 1px solid #ddd;
    display: inline-block;
}

.wmd-preview {
    position: relative;
    border: 1px dashed #ccc;
    padding: 16px;
    border-radius: 4px;
    background: transparent;
}

/* ==========================================================================
   Event Registration Form (.wmd-event-registration)
   ========================================================================== */

.wmd-event-registration {
    width: 100%;
}

.wmd-event-reg-form {
    width: 100%;
}

/* Sections */
.wmd-er-section {
    margin-bottom: var(--wmd-spacing-section, 24px);
}

.wmd-er-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--wmd-text-color, #333333);
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eeeeee;
}

/* Fields */
.wmd-er-field {
    margin-bottom: var(--wmd-spacing-field, 16px);
}

.wmd-er-field label {
    display: block;
    margin-bottom: 6px;
    font-size: var(--wmd-label-font-size, 14px);
    font-weight: var(--wmd-label-font-weight, 500);
    color: var(--wmd-text-color, #333333);
}

.wmd-er-required {
    color: #d63638;
}

.wmd-er-field input,
.wmd-er-field select {
    width: 100%;
    box-sizing: border-box;
    padding: var(--wmd-input-padding, 10px 14px);
    font-size: var(--wmd-input-font-size, 16px);
    color: var(--wmd-text-color, #333333);
    background-color: var(--wmd-input-bg, #ffffff);
    border: 1px solid var(--wmd-input-border, #cccccc);
    border-radius: var(--wmd-input-radius, 4px);
    transition: border-color 0.2s ease;
    appearance: none;
}

.wmd-er-field input:focus,
.wmd-er-field select:focus {
    outline: none;
    border-color: var(--wmd-primary-color, #453a8a);
    box-shadow: 0 0 0 2px rgba(69, 58, 138, 0.15);
}

/* Row layouts */
.wmd-er-field-row {
    display: flex;
    gap: 16px;
}

.wmd-er-two-col > .wmd-er-field {
    flex: 1 1 0;
    min-width: 0;
}

.wmd-er-three-col > .wmd-er-field {
    flex: 1 1 0;
    min-width: 0;
}

/* Order summary */
.wmd-er-order-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f9f9f9;
    border: 1px solid #eeeeee;
    border-radius: 4px;
    margin-bottom: 20px;
}

.wmd-er-order-label {
    font-weight: 500;
    color: var(--wmd-text-color, #333333);
}

.wmd-er-order-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--wmd-primary-color, #453a8a);
}

/* Errors */
.wmd-er-errors {
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #fff0f0;
    border: 1px solid #ffc0c0;
    border-radius: 4px;
    color: var(--wmd-error-color, #d63638);
    font-size: 14px;
    line-height: 1.5;
}

/* Submit button */
.wmd-er-submit-wrap {
    margin-top: 8px;
}

.wmd-er-submit-btn {
    display: inline-block;
    width: 100%;
    padding: var(--wmd-submit-button-padding, 14px 28px);
    background-color: var(--wmd-submit-button-bg, var(--wmd-primary-color, #453a8a));
    color: var(--wmd-submit-button-text, #ffffff);
    font-size: var(--wmd-submit-button-font-size, 16px);
    font-weight: var(--wmd-submit-button-font-weight, 600);
    border: none;
    border-radius: var(--wmd-submit-button-radius, 4px);
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    text-align: center;
}

.wmd-er-submit-btn:hover:not(:disabled) {
    background-color: var(--wmd-submit-button-hover-bg, #ada5d0);
    color: var(--wmd-submit-button-hover-text, #ffffff);
}

.wmd-er-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 600px) {
    .wmd-er-field-row {
        flex-direction: column;
        gap: 0;
    }
}