/* assets/css/prayer-pop.css */

/* Global Variables */
:root {
    --global-bg-color: #2755AA; /* Default global color for bubble and button */
    --global-font-color: #ffffff; /* White for text */
    --global-label-color: #333333; /* Dark gray for label text */
    --global-button-hover-color: #1F4A99; /* Hover color for button and bubble */
    --global-textarea-bg-color: #f9f9f9; /* Light gray for textarea background */
    --global-border-color: #ddd; /* Border color for inputs */
    --global-border-radius: 8px; /* Global border radius */
    --global-padding: 15px; /* Global padding */
    --global-margin: 15px; /* Global margin */
    --global-font-size: 16px; /* Global font size */
    --global-bold-font-weight: bold; /* Global bold font weight */
    --global-font-family: system-ui; /* Global font family */
    
    /* Heading-specific variables */
    --heading-font-family: var(--global-font-family); /* Heading font family */
    --heading-font-size: 24px; /* Heading font size */
    --heading-font-weight: 600; /* Heading font weight */
    
    /* Bubble-specific variables */
    --bubble-padding: 15px; /* Bubble padding */
    --bubble-margin: 20px; /* Bubble margin */
    --bubble-height: 60px; /* Bubble height */
    
    /* Checkbox-specific variables */
    --checkbox-margin: 8px; /* Checkbox spacing (smaller than global margin) */

}

/* Apply global font family to all elements */
#prayer-pop-bubble,
#prayer-pop-form-container,
#prayer-pop-form textarea,
#prayer-pop-form input[type="text"],
#prayer-pop-form button[type="submit"],
#prayer-pop-new-request,
.prayer-pop-button,
#prayer-pop-success,
#prayer-pop-error,
#prayer-pop-header h2,
#prayer-pop-description p,
#prayer-pop-last-time {
    font-family: var(--global-font-family);
}

/* Shared Bubble and popup motion. The saved Bubble Animation setting controls
 * both the initial Bubble entrance and every popup surface entrance/exit. */
@keyframes prayerpop-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes prayerpop-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes prayerpop-slide-in { from { opacity: .15; transform: translate3d(0, 64px, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes prayerpop-slide-out { from { opacity: 1; transform: translate3d(0, 0, 0); } to { opacity: 0; transform: translate3d(0, 48px, 0); } }
@keyframes prayerpop-gentle-rise-in { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes prayerpop-gentle-rise-out { from { opacity: 1; transform: translate3d(0, 0, 0); } to { opacity: 0; transform: translate3d(0, 8px, 0); } }
@keyframes prayerpop-soft-scale-in { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: scale(1); } }
@keyframes prayerpop-soft-scale-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(.9); } }
@keyframes prayerpop-pop-in {
    0% { opacity: 0; transform: scale(.76); }
    62% { opacity: 1; transform: scale(1.045); }
    82% { transform: scale(.992); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes prayerpop-pop-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(.84); } }
@keyframes prayerpop-bubble-slide-in { from { opacity: .1; transform: translateY(48px) scale(var(--prayerpop-bubble-scale, 1)); } to { opacity: 1; transform: translateY(0) scale(var(--prayerpop-bubble-scale, 1)); } }
@keyframes prayerpop-bubble-gentle-rise-in { from { opacity: 0; transform: translateY(11px) scale(var(--prayerpop-bubble-scale, 1)); } to { opacity: 1; transform: translateY(0) scale(var(--prayerpop-bubble-scale, 1)); } }
@keyframes prayerpop-bubble-soft-scale-in { from { opacity: 0; transform: scale(.68); } to { opacity: 1; transform: scale(var(--prayerpop-bubble-scale, 1)); } }
@keyframes prayerpop-bubble-pop-in {
    0% { opacity: 0; transform: scale(.55); }
    60% { opacity: 1; transform: scale(1.09); }
    80% { transform: scale(.975); }
    100% { opacity: 1; transform: scale(var(--prayerpop-bubble-scale, 1)); }
}

#prayer-pop-bubble.none { opacity: 1; transform: scale(var(--prayerpop-bubble-scale, 1)); }
#prayer-pop-bubble.fade-in { animation: prayerpop-fade-in 240ms cubic-bezier(0,0,.38,.9) both; }
#prayer-pop-bubble.gentle-rise { animation: prayerpop-bubble-gentle-rise-in 240ms cubic-bezier(0,0,.38,.9) both; }
#prayer-pop-bubble.soft-scale { animation: prayerpop-bubble-soft-scale-in 240ms cubic-bezier(0,0,.3,1) both; }
#prayer-pop-bubble.slide-up { animation: prayerpop-bubble-slide-in 240ms cubic-bezier(0,0,.3,1) both; }
#prayer-pop-bubble.bounce-in { animation: prayerpop-bubble-pop-in 240ms cubic-bezier(.2,.8,.2,1) both; }

#prayer-pop-form-container,
.ppfc-panel,
.prayer-pop-messenger { transform-origin: bottom right; }
#prayer-pop-modal[data-bubble-position="left"] #prayer-pop-form-container,
.ppfc-panel[data-position="left"],
.prayer-pop-messenger[data-bubble-position="left"] { transform-origin: bottom left; }

#prayer-pop-form-container.prayerpop-motion-enter.fade-in,
.ppfc-panel.prayerpop-motion-enter.fade-in,
.prayer-pop-messenger.prayerpop-motion-enter.fade-in { animation: prayerpop-fade-in 240ms cubic-bezier(0,0,.38,.9) both; }
#prayer-pop-form-container.prayerpop-motion-enter.gentle-rise,
.ppfc-panel.prayerpop-motion-enter.gentle-rise,
.prayer-pop-messenger.prayerpop-motion-enter.gentle-rise { animation: prayerpop-gentle-rise-in 240ms cubic-bezier(0,0,.38,.9) both; }
#prayer-pop-form-container.prayerpop-motion-enter.soft-scale,
.ppfc-panel.prayerpop-motion-enter.soft-scale,
.prayer-pop-messenger.prayerpop-motion-enter.soft-scale { animation: prayerpop-soft-scale-in 240ms cubic-bezier(0,0,.3,1) both; }
#prayer-pop-form-container.prayerpop-motion-enter.slide-up,
.ppfc-panel.prayerpop-motion-enter.slide-up,
.prayer-pop-messenger.prayerpop-motion-enter.slide-up { animation: prayerpop-slide-in 240ms cubic-bezier(0,0,.3,1) both; }
#prayer-pop-form-container.prayerpop-motion-enter.bounce-in,
.ppfc-panel.prayerpop-motion-enter.bounce-in,
.prayer-pop-messenger.prayerpop-motion-enter.bounce-in { animation: prayerpop-pop-in 240ms cubic-bezier(.2,.8,.2,1) both; }
#prayer-pop-form-container.prayerpop-motion-exit.fade-in,
.ppfc-panel.prayerpop-motion-exit.fade-in,
.prayer-pop-messenger.prayerpop-motion-exit.fade-in { animation: prayerpop-fade-out 240ms cubic-bezier(.2,0,1,.9) both; }
#prayer-pop-form-container.prayerpop-motion-exit.gentle-rise,
.ppfc-panel.prayerpop-motion-exit.gentle-rise,
.prayer-pop-messenger.prayerpop-motion-exit.gentle-rise { animation: prayerpop-gentle-rise-out 240ms cubic-bezier(.2,0,1,.9) both; }
#prayer-pop-form-container.prayerpop-motion-exit.soft-scale,
.ppfc-panel.prayerpop-motion-exit.soft-scale,
.prayer-pop-messenger.prayerpop-motion-exit.soft-scale { animation: prayerpop-soft-scale-out 240ms cubic-bezier(.2,0,1,.9) both; }
#prayer-pop-form-container.prayerpop-motion-exit.slide-up,
.ppfc-panel.prayerpop-motion-exit.slide-up,
.prayer-pop-messenger.prayerpop-motion-exit.slide-up { animation: prayerpop-slide-out 240ms cubic-bezier(.2,0,1,.9) both; }
#prayer-pop-form-container.prayerpop-motion-exit.bounce-in,
.ppfc-panel.prayerpop-motion-exit.bounce-in,
.prayer-pop-messenger.prayerpop-motion-exit.bounce-in { animation: prayerpop-pop-out 240ms cubic-bezier(.2,0,1,.9) both; }

@media (prefers-reduced-motion: reduce) {
    #prayer-pop-bubble,
    #prayer-pop-form-container,
    .ppfc-panel,
    .prayer-pop-messenger { animation: none !important; }
}

/* Bubble Styles */
#prayer-pop-bubble {
    --prayerpop-bubble-current-padding: var(--prayerpop-bubble-padding, var(--bubble-padding));
    --prayerpop-bubble-content-size: max(12px, calc(var(--bubble-height) - (var(--prayerpop-bubble-current-padding) * 2)));
    position: fixed;
    bottom: calc(var(--bubble-margin) + var(--bubble-offset-y, 0px));
    right: calc(var(--bubble-margin) + var(--bubble-offset-x, 0px));
    z-index: 999997;
    background-color: var(--global-bg-color);
    color: var(--global-font-color);
    border-radius: var(--global-border-radius);
    padding: var(--prayerpop-bubble-current-padding);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: var(--bubble-height);
    height: var(--bubble-height);
    font-size: var(--global-font-size);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    transform-origin: bottom right;
}

#prayer-pop-bubble[data-bubble-position="left"] {
    left: calc(var(--bubble-margin) + var(--bubble-offset-x, 0px));
    right: auto;
    transform-origin: bottom left;
}

#prayer-pop-bubble[data-bubble-shape="adaptive"],
#prayer-pop-bubble[data-bubble-shape="dynamic"] {
    width: auto;
    height: var(--bubble-height);
    min-width: max(var(--bubble-height), calc(var(--bubble-height) * var(--prayerpop-icon-scale, 1)));
}

#prayer-pop-bubble[data-bubble-shape="fixed_square"],
#prayer-pop-bubble[data-bubble-shape="square"] {
    width: var(--bubble-height);
    min-width: var(--bubble-height);
    height: var(--bubble-height);
}

#prayer-pop-bubble[data-bubble-shape="fixed_circle"],
#prayer-pop-bubble[data-bubble-shape="circle"] {
    width: var(--bubble-height);
    min-width: var(--bubble-height);
    height: var(--bubble-height);
    border-radius: 9999px;
    overflow: hidden;
    clip-path: circle(50% at 50% 50%);
    -webkit-clip-path: circle(50% at 50% 50%);
}

/* When form container is visible, adjust bubble position */
#prayer-pop-modal:not([style*="display: none"]) ~ #prayer-pop-bubble {
    transform: translateY(0);
}

/* Hover Animation */
#prayer-pop-bubble:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Unread Chat replies remain visible on the launcher while its panel is closed. */
#prayer-pop-bubble .prayer-pop-chat-unread-badge {
    position: absolute;
    z-index: 2;
    top: -7px;
    right: -7px;
    display: grid;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    box-sizing: border-box;
    place-items: center;
    border: 2px solid var(--bubble-bg-color, var(--global-bg-color, #2755aa));
    border-radius: 999px;
    background: #fff;
    color: var(--bubble-bg-color, var(--global-bg-color, #2755aa));
    box-shadow: 0 2px 7px rgba(15, 23, 42, .2);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

#prayer-pop-bubble[data-bubble-position="left"] .prayer-pop-chat-unread-badge {
    right: auto;
    left: -7px;
}

#prayer-pop-bubble .prayer-pop-chat-unread-badge[hidden] {
    display: none;
}

/* Chat Bubble Icon */
#prayer-pop-icon {
    font-size: var(--global-font-size);
    font-weight: bold;
    color: var(--global-font-color);
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    gap: clamp(8px, calc(8px * var(--prayerpop-icon-scale, 1)), 14px);
    white-space: nowrap;
    overflow: visible;
}

/* Bubble Icon Text */
.prayer-pop-icon-text {
    font-size: var(--global-font-size);
    font-weight: bold;
    color: var(--global-font-color);
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.prayer-pop-visual-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex: 0 0 auto;
    font-size: calc(clamp(12px, calc(var(--prayerpop-bubble-content-size) * 0.52), 56px) * var(--prayerpop-icon-scale, 1));
}

.prayer-pop-tabler-icon-wrap,
.prayer-pop-brand-icon-wrap {
    width: 1em;
    height: 1em;
    min-width: 1em;
    max-width: 1em;
    min-height: 1em;
    max-height: 1em;
    margin: 0;
    padding: 0;
    box-sizing: content-box;
    flex: 0 0 1em;
}

#prayer-pop-bubble[data-bubble-shape="fixed_square"] #prayer-pop-icon,
#prayer-pop-bubble[data-bubble-shape="square"] #prayer-pop-icon,
#prayer-pop-bubble[data-bubble-shape="fixed_circle"] #prayer-pop-icon,
#prayer-pop-bubble[data-bubble-shape="circle"] #prayer-pop-icon {
    font-size: clamp(20px, calc(var(--prayerpop-bubble-content-size) * 0.66), 44px);
    width: 1em;
    height: 1em;
    min-width: 1em;
    max-width: 1em;
    gap: 0;
    flex: 0 0 1em;
    overflow: visible;
}

#prayer-pop-bubble[data-bubble-shape="fixed_square"] .prayer-pop-icon-text,
#prayer-pop-bubble[data-bubble-shape="square"] .prayer-pop-icon-text,
#prayer-pop-bubble[data-bubble-shape="fixed_circle"] .prayer-pop-icon-text,
#prayer-pop-bubble[data-bubble-shape="circle"] .prayer-pop-icon-text {
    font-size: inherit;
}

#prayer-pop-bubble[data-bubble-shape="fixed_square"][data-bubble-display="icon_text"] .prayer-pop-icon-text,
#prayer-pop-bubble[data-bubble-shape="fixed_square"][data-bubble-display="text_icon"] .prayer-pop-icon-text,
#prayer-pop-bubble[data-bubble-shape="square"][data-bubble-display="icon_text"] .prayer-pop-icon-text,
#prayer-pop-bubble[data-bubble-shape="square"][data-bubble-display="text_icon"] .prayer-pop-icon-text,
#prayer-pop-bubble[data-bubble-shape="fixed_circle"][data-bubble-display="icon_text"] .prayer-pop-icon-text,
#prayer-pop-bubble[data-bubble-shape="fixed_circle"][data-bubble-display="text_icon"] .prayer-pop-icon-text,
#prayer-pop-bubble[data-bubble-shape="circle"][data-bubble-display="icon_text"] .prayer-pop-icon-text,
#prayer-pop-bubble[data-bubble-shape="circle"][data-bubble-display="text_icon"] .prayer-pop-icon-text {
    display: none;
}

#prayer-pop-bubble[data-bubble-shape="fixed_square"] .prayer-pop-visual-icon,
#prayer-pop-bubble[data-bubble-shape="square"] .prayer-pop-visual-icon,
#prayer-pop-bubble[data-bubble-shape="fixed_circle"] .prayer-pop-visual-icon,
#prayer-pop-bubble[data-bubble-shape="circle"] .prayer-pop-visual-icon {
    font-size: calc(1em * var(--prayerpop-icon-scale, 1));
}

#prayer-pop-bubble[data-bubble-display="icon"] .prayer-pop-icon-text {
    display: none;
}

#prayer-pop-bubble[data-bubble-display="text"] .prayer-pop-visual-icon {
    display: none;
}

#prayer-pop-bubble[data-bubble-display="text_icon"] #prayer-pop-icon {
    flex-direction: row-reverse;
}

/* Dashicon Styling */
.prayer-pop-dashicon {
    font-size: 1em;
    width: 1em;
    height: 1em;
    line-height: 1;
    color: var(--global-font-color);
    transition: transform 0.3s ease;
    font-family: dashicons;
    font-weight: normal;
    font-style: normal;
    speak: never;
    display: inline-block;
    text-decoration: inherit;
    text-transform: none;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.prayer-pop-tabler-icon-wrap .prayer-pop-tabler-icon {
    width: 1em;
    height: 1em;
    display: block;
    stroke: currentColor;
    fill: none;
    margin: auto;
    flex: 0 0 1em;
}

.prayer-pop-brand-icon-wrap .prayer-pop-brand-icon {
    width: 1em;
    height: 1em;
    display: block;
}

/* Mobile Responsive Optimizations */
@media screen and (max-width: 768px) {
    /* Dashicon adjustments */
    .prayer-pop-dashicon {
        font-size: 1em;
        width: 1em;
        height: 1em;
    }
    
    /* Optimize modal positioning and spacing for mobile */
    #prayer-pop-form-container {
        width: calc(100vw - 40px);
        max-width: 400px;
        right: 20px;
        bottom: calc(var(--bubble-height) + var(--bubble-margin) + 10px);
        padding: 15px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }

    /* Reduce header margins */
    #prayer-pop-header {
        margin-bottom: 10px;
    }
    
    #prayer-pop-description {
        margin-bottom: 15px;
    }
    
    /* Optimize form spacing */
    #prayer-pop-form textarea {
        margin-bottom: 12px;
        min-height: 100px;
    }
    
    #prayer-pop-name-container {
        margin-bottom: 12px;
    }
    
    .prayer-pop-checkbox-container {
        margin-bottom: 6px;
    }
    
    /* Reduce back button margin */
    #prayer-pop-back-button {
        margin-bottom: 10px;
    }
    
    /* Optimize bubble for mobile */
    #prayer-pop-bubble {
        bottom: calc(20px + var(--bubble-offset-y, 0px));
        right: calc(20px + var(--bubble-offset-x, 0px));
    }

    #prayer-pop-modal[data-bubble-position="left"] #prayer-pop-form-container {
        left: calc(20px + var(--bubble-offset-x, 0px));
        right: auto;
    }

    #prayer-pop-bubble[data-bubble-position="left"] {
        left: calc(20px + var(--bubble-offset-x, 0px));
        right: auto;
    }
}

/* Form Container bottom: calc(var(--bubble-height) + var(--bubble-margin) + 20px); */
#prayer-pop-form-container {
    position: fixed;
    right: calc(var(--bubble-margin) + var(--bubble-offset-x, 0px));
    box-sizing: border-box;
    width: min(360px, calc(100vw - 40px));
    background-color: #ffffff;
    border-radius: var(--global-border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: var(--global-padding);
    border: none;
    font-size: var(--global-font-size);
    opacity: 1;
    z-index: 999998;
    transition: transform 0.3s ease, opacity 0.3s ease, height 180ms cubic-bezier(.2, .8, .2, 1);
    
}

@media (prefers-reduced-motion: reduce) {
    #prayer-pop-form-container {
        transition: none;
    }
}

#prayer-pop-modal[data-bubble-position="left"] #prayer-pop-form-container {
    left: calc(var(--bubble-margin) + var(--bubble-offset-x, 0px));
    right: auto;
}

.prayer-pop-popup-intro--hero {
	--prayerpop-classic-intro-overlap: 24px;
    position: relative;
	min-height: 0;
    margin: calc(0px - var(--global-padding)) calc(0px - var(--global-padding)) var(--global-margin);
	padding-top: 16px;
	overflow: visible;
    border-radius: var(--global-border-radius) var(--global-border-radius) 0 0;
	background: transparent;
	color: var(--global-label-color, #172033);
}

.prayer-pop-popup-intro--hero:not(.prayer-pop-popup-intro--has-image)::before {
	content: "";
	position: absolute;
	/* Keep the welcome card visibly overlapping the header at every text length. */
	inset: 0 0 var(--prayerpop-classic-intro-overlap);
	border-radius: var(--global-border-radius) var(--global-border-radius) 0 0;
	background: var(--global-bg-color);
}

.prayer-pop-popup-intro__media::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: #000;
    opacity: 0.35;
}

.prayer-pop-popup-intro__media {
    position: absolute;
	inset: 0 0 var(--prayerpop-classic-intro-overlap);
    width: 100%;
	overflow: hidden;
	border-radius: var(--global-border-radius) var(--global-border-radius) 0 0;
	background: var(--global-bg-color);
}

.prayer-pop-popup-intro__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
	transform: scale(1.12);
}

.prayer-pop-popup-intro__content {
    position: relative;
    z-index: 2;
	display: grid;
	min-height: 0;
	margin: 0 14px;
	padding: 14px;
	box-sizing: border-box;
	align-content: end;
	gap: 6px;
	border: 1px solid var(--global-border-color, #dfe2e7);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(23, 32, 51, 0.1);
}

.prayer-pop-popup-intro__sender {
	display: flex;
	align-items: center;
	gap: 9px;
}

.prayer-pop-popup-intro--hero .prayer-pop-popup-intro__sender strong {
	font-weight: 600;
}

.prayer-pop-popup-intro__avatar {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--global-bg-color);
	color: var(--global-font-color, #fff);
	font-size: 23px;
}

.prayer-pop-popup-intro__sender > span:last-child {
	display: grid;
	align-content: center;
	gap: 1px;
}

.prayer-pop-popup-intro__sender strong {
	margin: 0;
	color: #172033;
	font-size: calc(var(--global-font-size) * 0.875);
	font-weight: 500;
	line-height: 1.25;
}

.prayer-pop-popup-intro__sender small {
	display: flex;
	align-items: center;
	gap: 5px;
	color: #737b89;
	font-size: calc(var(--global-font-size) * 0.75);
}

.prayer-pop-popup-intro__sender small i {
	display: block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--global-bg-color);
}

.prayer-pop-popup-intro--hero .prayer-pop-popup-intro__message {
	margin: 0;
}

.prayer-pop-popup-intro__title {
	margin: 0;
	color: #172033;
	font-family: var(--heading-font-family);
	font-size: var(--global-font-size);
    font-weight: var(--heading-font-weight);
	line-height: 1.35;
}

.prayer-pop-popup-intro--hero .prayer-pop-popup-intro__title {
	font-size: 22px;
}

.prayer-pop-popup-intro__description {
	max-width: none;
	margin: 3px 0 0;
	color: #4f5663;
    font-family: var(--global-font-family);
	font-size: calc(var(--global-font-size) * 0.875);
    line-height: 1.45;
}

/* Chat-style home actions remain the same two Free capabilities. */
#prayer-pop-initial-options {
    display: flex;
    flex-direction: column;
    gap: var(--global-margin);
}

.prayer-pop-option-button {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr) 20px;
	align-items: center;
	gap: 11px;
    width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--global-border-color, #dfe2e7);
	border-radius: 12px;
	background: #fff;
	color: #172033;
    font-family: var(--global-font-family);
	font-size: calc(var(--global-font-size) * 0.92);
    font-weight: var(--global-bold-font-weight);
	text-align: left;
    cursor: pointer;
	transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.prayer-pop-option-button:hover {
	border-color: var(--global-bg-color);
	background: #f8f9fc;
	background: color-mix(in srgb, var(--global-bg-color) 4%, #fff);
	transform: translateY(-1px);
}

.prayer-pop-option-button:focus-visible {
	outline: 3px solid rgba(39, 85, 170, 0.24);
	outline: 3px solid color-mix(in srgb, var(--global-bg-color) 28%, transparent);
	outline-offset: 2px;
}

.prayer-pop-option-button__icon {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #eef2fb;
	background: color-mix(in srgb, var(--global-bg-color) 10%, #fff);
	color: var(--global-bg-color);
	font-size: 18px;
}

.prayer-pop-option-button__label {
	min-width: 0;
}

.prayer-pop-option-button__chevron {
	color: #8a92a0;
	font-size: 18px;
}

/* Shared Pro-style icon-only back control and aligned classic header. */
#prayer-pop-back-button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--global-border-color, #d5d9e0) !important;
    border-radius: 50% !important;
    background: var(--global-textarea-bg-color, #fff) !important;
    color: var(--global-label-color);
    cursor: pointer;
}

#prayer-pop-back-button:hover {
    color: var(--global-bg-color);
    border-color: var(--global-bg-color) !important;
}

#prayer-pop-back-button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--global-bg-color) 28%, transparent);
    outline-offset: 2px;
}

.ppm-classic-screen-header {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    margin: 0 0 var(--global-margin);
    padding: 0 0 var(--global-margin);
    border-bottom: 1px solid var(--global-border-color, #dfe2e7);
}

.ppm-classic-screen-header #prayer-pop-header,
.ppm-classic-screen-header .prayer-pop-heading {
    margin: 0;
}

.ppm-classic-screen-header .prayer-pop-heading,
.ppm-classic-screen-header #prayer-pop-header h2 {
	font-size: calc(var(--global-font-size) * 1.125);
	line-height: 1.3;
}

.ppm-classic-screen-header .dashicons {
    width: 24px;
    height: 24px;
    font-size: 24px;
}

/* Form Styling */
#prayer-pop-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Text Area */
#prayer-pop-form textarea {
    width: 100%;
    margin-bottom: var(--global-margin);
    padding: var(--global-padding);
    border: 1px solid var(--global-border-color);
    border-radius: var(--global-border-radius);
	font-size: var(--global-font-size);
    background-color: var(--global-textarea-bg-color);
    color: var(--global-label-color);
    box-sizing: border-box;
    height: 120px;
    resize: vertical;
}

#prayer-pop-form textarea::placeholder {
    color: var(--global-label-color);
    opacity: 0.7;
}

/* Input Field - No margin as containers handle spacing */
#prayer-pop-form input[type="text"] {
    width: 100%;
    margin: 0;
    padding: var(--global-padding);
    border: 1px solid var(--global-border-color);
    border-radius: var(--global-border-radius);
	font-size: var(--global-font-size);
    background-color: var(--global-textarea-bg-color);
    box-sizing: border-box;
}

/* Submit Button */
#prayer-pop-form button[type="submit"] {
    width: 100%;
    background-color: var(--global-bg-color);
    color: var(--global-font-color);
    border: none;
    border-radius: var(--global-border-radius);
    padding: var(--global-padding);
	font-size: var(--global-font-size);
    font-weight: var(--global-bold-font-weight);
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease;
    margin-top: calc(var(--global-margin) / 2);
}

#prayer-pop-form button[type="submit"]:hover {
    background-color: var(--global-button-hover-color);
}

/* Success and Error Messages */
#prayer-pop-success,
#prayer-pop-error {
    padding: var(--global-padding);
    border-radius: var(--global-border-radius);
    margin: var(--global-margin) 0;
    font-size: var(--global-font-size);
    text-align: left;
}

#prayer-pop-success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

#prayer-pop-error {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

/* Form Modal */
#prayer-pop-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
}

/* Header Style */
#prayer-pop-header {
    margin-bottom: calc(var(--global-margin) / 2);
}

.prayer-pop-heading,
#prayer-pop-header h2 {
    font-size: var(--heading-font-size);
    color: var(--global-label-color);
    margin: 0;
    padding: 0;
    font-weight: var(--heading-font-weight);
    font-family: var(--heading-font-family);
}

/* Description Style */
#prayer-pop-description {
    margin-bottom: var(--global-margin);
}

#prayer-pop-description p {
    font-size: var(--global-font-size);
    color: var(--global-label-color);
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

#prayer-pop-form-wrapper > #prayer-pop-description p {
	font-size: calc(var(--global-font-size) * 0.9);
	line-height: 1.45;
}

/* Adjust form wrapper */
#prayer-pop-form-wrapper {
    display: flex;
    flex-direction: column;
}

/* Last Time Message */
#prayer-pop-last-time {
    margin-bottom: var(--global-margin);
    padding: 2px 2px;
    background-color: transparent;
    border-radius: 0;
    box-sizing: border-box;
    font-size: 0.9em;
    color: #666;
    display: none; /* Hidden by default */
    align-items: center;
    transition: opacity 0.3s ease;
    opacity: 1;
    gap: 9px;
    line-height: 1.4;
}

#prayer-pop-last-time::before {
    content: "";
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    background: linear-gradient(currentColor, currentColor) 6px 2px / 1.5px 5px no-repeat,
        linear-gradient(currentColor, currentColor) 6px 6px / 4px 1.5px no-repeat;
    opacity: 0.8;
}

/* Only show timer when in form view and has content */
#prayer-pop-form-wrapper:not(.initial-view) #prayer-pop-last-time:not(:empty) {
    display: flex;
}

/* Hide timer completely when empty or in initial view */
#prayer-pop-form-wrapper.initial-view #prayer-pop-last-time,
#prayer-pop-last-time:empty {
    display: none !important;
    opacity: 0;
}

/* Form Wrapper States */
#prayer-pop-form-wrapper {
    position: relative;
}

#prayer-pop-form-wrapper.initial-view #prayer-pop-last-time {
    display: none !important;
}

#prayer-pop-new-request,
.prayer-pop-button {
    width: 100%;
    background-color: var(--global-bg-color);
    color: var(--global-font-color);
    border: none;
    border-radius: var(--global-border-radius);
    padding: var(--global-padding);
    font-size: var(--global-font-size);
    font-weight: var(--global-bold-font-weight);
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease;
}

#prayer-pop-new-request:hover,
.prayer-pop-button:hover {
    background-color: #005a8c;
}

#prayer-pop-new-request {
    background-color: transparent;
    color: var(--global-bg-color);
    border: 1px solid var(--global-bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

#prayer-pop-new-request:hover {
    background-color: color-mix(in srgb, var(--global-bg-color) 12%, transparent);
}

/* Name container - handles margin for name input */
#prayer-pop-name-container {
    margin-bottom: var(--global-margin);
}

/* Checkbox spacing/layout must beat theme-level #id label/input rules */
#prayer-pop-form .prayer-pop-checkbox-container {
    margin: 0 0 var(--checkbox-margin);
    padding: 0;
}

#prayer-pop-form .prayer-pop-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: calc(var(--global-margin) / 2);
    font-size: var(--global-font-size);
    color: var(--global-label-color);
    cursor: pointer;
    line-height: 1.3;
    margin: 0;
    padding: 0;
}

#prayer-pop-form .prayer-pop-checkbox-label input[type="checkbox"] {
    margin: 0;
    padding: 0;
    cursor: pointer;
    flex: 0 0 auto;
    width: 1.15em;
    height: 1.15em;
    box-sizing: border-box;
    border: 1px solid var(--global-border-color);
    border-radius: 4px;
    background-color: var(--global-textarea-bg-color);
    -webkit-appearance: none;
    appearance: none;
}

#prayer-pop-form .prayer-pop-checkbox-label input[type="checkbox"]:checked {
    border-color: var(--global-bg-color);
    background-color: var(--global-bg-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 8 3 3 7-7' fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

#prayer-pop-form :where(textarea, input[type="text"], input[type="email"]):focus-visible {
    border-color: var(--global-bg-color);
    outline: 3px solid color-mix(in srgb, var(--global-bg-color) 24%, transparent);
    outline-offset: 1px;
}

#prayer-pop-form .prayer-pop-checkbox-label input[type="checkbox"]:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--global-bg-color) 28%, transparent);
    outline-offset: 2px;
}

#prayer-pop-form button[type="submit"]:focus-visible,
#prayer-pop-new-request:focus-visible,
.prayer-pop-button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--global-bg-color) 32%, transparent);
    outline-offset: 3px;
}

#prayer-pop-form :where(button, input, textarea):disabled {
    cursor: not-allowed;
}
/* Isolated settings preview document. */
.prayer-pop-preview-document,
.prayer-pop-preview-page {
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: transparent !important;
}

.prayer-pop-preview-page #wpadminbar {
    display: none !important;
}
/* Dynamic option values are supplied as validated custom properties. */
.prayer-pop-heading,
#prayer-pop-header h2 {
    margin: 0;
    padding: 0;
    color: var(--global-label-color);
    font-family: var(--heading-font-family);
    font-size: var(--heading-font-size);
    font-weight: var(--heading-font-weight);
}

#prayer-pop-bubble {
    background-color: var(--bubble-bg-color, var(--global-bg-color));
    border-radius: var(--bubble-border-radius, var(--global-border-radius));
    transform: scale(var(--prayerpop-bubble-scale, 1));
}

#prayer-pop-bubble:hover {
    transform: scale(var(--prayerpop-bubble-hover-scale, 1.03));
}
