/* Primary button - fallback for use outside Bricks wrapper */
.lily-btn-primary {
    background-color: #116233 !important;
    color: #ffffff !important;
    border: none !important;
}
.lily-btn-primary:hover {
    background-color: #0a3d1f !important;
    color: #ffffff !important;
}

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

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

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

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

/* Donation Form Styles */
.lily-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: white;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.amount-option input[type="radio"]:checked + .amount-label {
    background: #2271b1;
    border-color: #2271b1;
    color: white;
}

.amount-option:hover .amount-label {
    border-color: #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 */
.lily-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

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

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

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

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

.lily-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;
}

/* 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;
}

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

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

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

a.share-btn {
    color: white;
}

/* Account tabs — one horizontal row, wrapping on narrow screens */
.lily-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 20px;
	margin: 0 0 32px;
	padding-bottom: 12px;
	border-bottom: 1px solid #e0e0e0;
}

.lily-tab-link {
	display: inline-block;
	padding: 8px 0;
	color: #2c5a4a;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	line-height: 1.3;
	border-bottom: 2px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.lily-tab-link:hover,
.lily-tab-link:focus-visible {
	color: #1d3d32;
	border-bottom-color: #cfe0d8;
}

.lily-tab-link.active {
	color: #1d3d32;
	border-bottom-color: #2c5a4a;
}

/* Logout reads as secondary, but stays on the same line — margin-left:auto
   would claim the rest of the row and push it onto a line of its own. */
.lily-tabs-nav .lily-logout-link {
	font-weight: 500;
	color: #777;
}

.lily-tabs-nav .lily-logout-link:hover {
	color: #333;
	border-bottom-color: #ddd;
}

@media (max-width: 700px) {
	.lily-tabs-nav {
		gap: 2px 16px;
	}
}

.lily-success {
	color: green;
}

.lily-error {
	color: red;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.lily-goal {
    color: #888;
}

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

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

.lily-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(--lily-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(--lily-children-title-color, #203D79);
    font-size: var(--lily-children-title-font-size, 1.1rem);
}

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

.child-card-horizontal .progress-bar {
    height: 8px;
    background: var(--lily-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(--lily-progress-gradient-start, #667eea) 0%, var(--lily-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(--lily-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 */
.lily-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

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

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

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

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

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

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

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

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

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

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

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

/* Form row for first/last name */
.lily-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.lily-btn.lily-btn-secondary.lily-prev-step {
    margin: 2rem 0;
}

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

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

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

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

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

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

#lily-wallet-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
   ========================================================================== */

.lily-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;
}

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

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

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

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

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

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

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

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

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

/* Text-like controls only. A bare `input` selector here also caught the team
   radios, and `appearance: none` strips a radio's dial completely — the control
   still worked, but nothing showed which option was selected. */
.lily-er-field input:not([type="radio"]):not([type="checkbox"]),
.lily-er-field select {
    width: 100%;
    box-sizing: border-box;
    padding: var(--lily-input-padding, 10px 14px);
    font-size: var(--lily-input-font-size, 16px);
    color: var(--lily-text-color, #333333);
    background-color: var(--lily-input-bg, #ffffff);
    border: 1px solid var(--lily-input-border, #cccccc);
    border-radius: var(--lily-input-radius, 4px);
    transition: border-color 0.2s ease;
    appearance: none;
}

.lily-er-field input:not([type="radio"]):not([type="checkbox"]):focus,
.lily-er-field select:focus {
    outline: none;
    border-color: var(--lily-primary-color, #116233);
    box-shadow: 0 0 0 2px rgba(17, 98, 51, 0.15);
}

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

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

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

/* Order summary */
.lily-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;
}

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

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

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

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

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

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

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

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

/* -------------------------------------------------------------------------
   Form rhythm
   Headings, intros and fields across the account tabs, so every form
   breathes the same way rather than each one setting its own margins.
   ------------------------------------------------------------------------- */

.lily-account-header {
	margin-bottom: 24px;
}

.lily-account-header h2 {
	margin: 0;
}

/* Tab panels: a heading, an optional intro line, then the form */
.lily-tab-content > div > h2,
.lily-tab-content > div > h3,
.lily-create-fundraiser > h2,
.lily-create-campaign-tab > h3,
.lily-my-fundraisers-tab > h3 {
	margin: 0 0 8px;
	line-height: 1.25;
}

.lily-create-fundraiser > p,
.lily-create-campaign-tab > p,
.lily-tab-content > div > h2 + p,
.lily-tab-content > div > h3 + p {
	margin: 0 0 28px;
	color: #555;
	line-height: 1.5;
}

/* Sections within a tab need air above them, not just below */
.lily-tab-content .lily-section {
	margin-top: 40px;
}

.lily-tab-content .lily-section:first-child {
	margin-top: 0;
}

/* Fields */
.lily-form-group {
	margin-bottom: 20px;
}

.lily-form-group label {
	margin-bottom: 6px;
}

/* Every control the forms actually use, not just text and textarea —
   select, date, number, tel, password and file were unstyled. */
.lily-form-group input[type="text"],
.lily-form-group input[type="email"],
.lily-form-group input[type="tel"],
.lily-form-group input[type="url"],
.lily-form-group input[type="password"],
.lily-form-group input[type="number"],
.lily-form-group input[type="date"],
.lily-form-group input[type="search"],
.lily-form-group select,
.lily-form-group textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
	color: #333;
	background-color: #fff;
	box-sizing: border-box;
}

.lily-form-group select {
	height: auto;
	line-height: 1.4;
}

.lily-form-group input:focus,
.lily-form-group select:focus,
.lily-form-group textarea:focus {
	border-color: #2c5a4a;
	outline: 2px solid rgba(44, 90, 74, 0.15);
	outline-offset: 0;
}

.lily-form-group input[type="file"] {
	display: block;
	padding: 8px 0;
	font-size: 14px;
}

/* A submit button should not sit flush against the last field */
.lily-form > button[type="submit"],
.lily-form-group + button[type="submit"],
form .lily-btn-primary[type="submit"] {
	margin-top: 8px;
}

/* Messages sit between the intro and the form; give them room on both sides */
.lily-tab-content .lily-message {
	margin: 0 0 24px;
}


/* Donation form: the step heading ("Donation Amount") needs room beneath it
   before the amount buttons. Nothing styled these headings before, so they
   inherited whatever margin the theme happened to give an h3. */
.lily-checkout-step > h3 {
	margin: 36px 0 24px;
	line-height: 1.25;
}

/* The first heading in a step opens it — the page's own heading sits above,
   so it needs the space below but not above. */
.lily-checkout-step > h3:first-child {
	margin-top: 0;
}


/* Radios and checkboxes on the registration form: native control, label
   alongside it, the whole row clickable. */
.lily-er-field input[type="radio"],
.lily-er-field input[type="checkbox"] {
	flex: none;
	width: auto;
	margin: 0;
	padding: 0;
	appearance: auto;
	-webkit-appearance: auto;
	accent-color: var(--lily-primary-color, #116233);
	cursor: pointer;
}

.lily-er-team-option label,
.lily-er-field label:has(> input[type="radio"]),
.lily-er-field label:has(> input[type="checkbox"]) {
	display: flex;
	align-items: center;
	gap: .55rem;
	margin-bottom: 0;
	font-weight: 400;
	cursor: pointer;
}

.lily-er-team-option {
	margin-bottom: 10px;
}

/* The control a team option reveals sits under its radio, indented to it. */
.lily-er-team-option .lily-er-team-select,
.lily-er-team-option .lily-er-team-name {
	margin-top: 8px;
	margin-left: 1.6rem;
	width: calc(100% - 1.6rem);
}

.lily-er-team-option .description {
	margin: 6px 0 0 1.6rem;
	font-size: 13px;
	color: #666;
}

.lily-er-field input[type="radio"]:focus-visible,
.lily-er-field input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--lily-primary-color, #116233);
	outline-offset: 2px;
}
