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

/* Global Variables */
:root {
    --pp-bg-color: #2755AA; /* Default global color for bubble and button */
    --pp-font-color: #ffffff; /* White for text */
    --pp-label-color: #333333; /* Dark gray for label text */
    --pp-button-hover-color: #1F4A99; /* Hover color for button and bubble */
    --pp-textarea-bg-color: #f9f9f9; /* Light gray for textarea background */
    --pp-border-color: #ddd; /* Border color for inputs */
    --pp-border-radius: 8px; /* Global border radius */
    --pp-panel-border-radius: 20px;
    /* Target width of every popup/chat panel — the default form popup and the
       footer-chat panel. One token so they stay the same size; each still
       clamps to the viewport on small screens via
       min(var(--pp-popup-width), calc(100vw - 32px)). */
    --pp-popup-width: 400px;
    --pp-padding: 15px; /* Global padding */
    --pp-screen-inset: 20px;
    --pp-header-height: 56px;
    --pp-control-size: 28px;
    --pp-control-inset: 12px;
    --pp-header-gutter: calc(var(--pp-control-inset) + var(--pp-control-size) + 8px);
    --pp-control-offset: calc((var(--pp-header-height) - var(--pp-control-size)) / 2);
    --pp-control-color: #687181;
    --pp-space-2xs: 4px;
    --pp-space-xs: 8px;
    --pp-space-md: 16px;
    --pp-field-padding-y: 12px;
    --pp-field-padding-x: 14px;
    --pp-margin: 15px; /* Global margin */
    --pp-font-size: 16px; /* Global font size */
    --pp-bold-font-weight: bold; /* Global bold font weight */
    --pp-font-family: system-ui; /* Global font family */
    
    /* Heading-specific variables */
    --pp-heading-font-family: var(--pp-font-family); /* Heading font family */
    --pp-heading-font-size: 24px; /* Heading font size */
    --pp-heading-font-weight: 600; /* Heading font weight */
    
    /* Bubble-specific variables */
    --pp-bubble-padding: 15px; /* Bubble padding */
    --pp-bubble-margin: 20px; /* Bubble margin */
    --pp-bubble-height: 60px; /* Bubble height */
    
    /* Checkbox-specific variables */
    --pp-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(--pp-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(--pp-bubble-padding));
    --prayerpop-bubble-content-size: max(12px, calc(var(--pp-bubble-height) - (var(--prayerpop-bubble-current-padding) * 2)));
    position: fixed;
    bottom: calc(var(--pp-bubble-margin) + var(--pp-bubble-offset-y, 0px));
    right: calc(var(--pp-bubble-margin) + var(--pp-bubble-offset-x, 0px));
    z-index: 999997;
    background-color: var(--pp-bg-color);
    color: var(--pp-font-color);
    border-radius: var(--pp-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(--pp-bubble-height);
    height: var(--pp-bubble-height);
    font-size: var(--pp-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(--pp-bubble-margin) + var(--pp-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(--pp-bubble-height);
    min-width: max(var(--pp-bubble-height), calc(var(--pp-bubble-height) * var(--prayerpop-icon-scale, 1)));
}

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

#prayer-pop-bubble[data-bubble-shape="fixed_circle"],
#prayer-pop-bubble[data-bubble-shape="circle"] {
    width: var(--pp-bubble-height);
    min-width: var(--pp-bubble-height);
    height: var(--pp-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(--pp-bubble-bg-color, var(--pp-bg-color, #2755aa));
    border-radius: 999px;
    background: #fff;
    color: var(--pp-bubble-bg-color, var(--pp-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(--pp-font-size);
    font-weight: bold;
    color: var(--pp-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(--pp-font-size);
    font-weight: bold;
    color: var(--pp-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(--pp-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: var(--pp-popup-width);
        right: 20px;
        bottom: calc(var(--pp-bubble-height) + var(--pp-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(--pp-bubble-offset-y, 0px));
        right: calc(20px + var(--pp-bubble-offset-x, 0px));
    }

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

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

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

@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(--pp-bubble-margin) + var(--pp-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(--pp-screen-inset)) calc(0px - var(--pp-screen-inset)) var(--pp-margin);
	padding-top: 16px;
	overflow: visible;
	border-radius: var(--pp-panel-border-radius) var(--pp-panel-border-radius) 0 0;
	background: transparent;
	color: var(--pp-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(--pp-panel-border-radius) var(--pp-panel-border-radius) 0 0;
	background: var(--pp-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(--pp-panel-border-radius) var(--pp-panel-border-radius) 0 0;
	background: var(--pp-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(--pp-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;
	flex: 0 0 34px;
	border-radius: 50%;
	background: var(--pp-bg-color);
	color: var(--pp-font-color, #fff);
	font-size: 23px;
	object-fit: cover;
}

.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(--pp-font-size) * 0.875);
	font-weight: 500;
	line-height: 1.1;
}

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

.prayer-pop-popup-intro__sender small i {
	display: block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--pp-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(--pp-heading-font-family);
	font-size: var(--pp-font-size);
    font-weight: var(--pp-heading-font-weight);
	line-height: 1.35;
}

.prayer-pop-popup-intro--hero .prayer-pop-popup-intro__title {
	font-size: var(--popup-intro-title-font-size, 22px);
}

.prayer-pop-popup-intro__description {
	max-width: none;
	margin: 3px 0 0;
	color: #4f5663;
    font-family: var(--pp-font-family);
	font-size: var(--popup-intro-description-font-size, 18px);
    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(--pp-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(--pp-border-color, #dfe2e7);
	border-radius: 12px;
	background: #fff;
	color: #172033;
    font-family: var(--pp-font-family);
	font-size: calc(var(--pp-font-size) * 0.92);
    font-weight: var(--pp-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(--pp-bg-color);
	background: #f8f9fc;
	background: color-mix(in srgb, var(--pp-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(--pp-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(--pp-bg-color) 10%, #fff);
	color: var(--pp-bg-color);
	font-size: 18px;
}

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

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

#prayer-pop-back-button {
    display: grid;
    place-items: center;
    width: var(--pp-control-size);
    height: var(--pp-control-size);
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--pp-control-color);
    cursor: pointer;
}

#prayer-pop-back-button:hover {
    color: var(--pp-bubble-bg-color, var(--pp-bg-color));
}

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

.ppm-classic-screen-header {
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    min-height: var(--pp-header-height);
    margin: calc(0px - var(--pp-screen-inset)) calc(0px - var(--pp-screen-inset)) var(--pp-screen-inset);
    padding: 8px var(--pp-header-gutter) 8px var(--pp-control-inset);
    border-bottom: 1px solid var(--pp-border-color, #dfe2e7);
}

.ppm-classic-screen-header #prayer-pop-header {
    position: absolute;
    top: 50%;
    right: var(--pp-header-gutter);
    left: var(--pp-header-gutter);
    margin: 0;
    transform: translateY(-50%);
    text-align: center;
}

.ppm-classic-screen-header .prayer-pop-heading,
.ppm-classic-screen-header #prayer-pop-header h2 {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
    line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

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

/* Form Styling */
#prayer-pop-form {
    display: flex;
    flex-direction: column;
    gap: var(--pp-space-md);
    margin-top: var(--pp-space-md);
}

#prayer-pop-form .prayer-pop-field-group {
    display: flex;
    flex-direction: column;
    gap: var(--pp-space-xs);
}

#prayer-pop-form .prayer-pop-field-group #prayer-pop-name-container {
    margin: 0;
}

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

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

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

/* Submit Button
   "Send One More" (#prayer-pop-new-request) shares this rule on purpose: it
   repeats the same action, so it should look and feel like the same button,
   not a secondary/outline variant. */
#prayer-pop-form button[type="submit"],
#prayer-pop-new-request {
    width: 100%;
    background-color: var(--pp-bg-color);
    color: var(--pp-font-color);
    border: none;
    border-radius: var(--pp-border-radius);
    padding: var(--pp-padding);
	font-size: var(--pp-font-size);
    font-weight: var(--pp-bold-font-weight);
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease;
    margin-top: 0;
}

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

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

#prayer-pop-success {
    margin-top: 0;
    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: var(--pp-space-2xs);
}

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

/* Description Style */
#prayer-pop-description {
    margin-bottom: 0;
}

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

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

/* Last Time Message */
#prayer-pop-last-time {
    margin-bottom: var(--pp-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 itself is styled with #prayer-pop-form
   button[type="submit"] above, so it matches Submit exactly. .prayer-pop-button
   stays as a reusable alias of that same look for any other "repeat the
   primary action" button. */
.prayer-pop-button {
    width: 100%;
    background-color: var(--pp-bg-color);
    color: var(--pp-font-color);
    border: none;
    border-radius: var(--pp-border-radius);
    padding: var(--pp-padding);
    font-size: var(--pp-font-size);
    font-weight: var(--pp-bold-font-weight);
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease;
}

.prayer-pop-button:hover {
    background-color: var(--pp-button-hover-color);
}

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

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

#prayer-pop-form .prayer-pop-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: calc(var(--pp-margin) / 2);
    font-size: var(--pp-font-size);
    color: var(--pp-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(--pp-border-color);
    border-radius: 4px;
    background-color: var(--pp-textarea-bg-color);
    -webkit-appearance: none;
    appearance: none;
}

#prayer-pop-form .prayer-pop-checkbox-label input[type="checkbox"]:checked {
    border-color: var(--pp-bg-color);
    background-color: var(--pp-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(--pp-bg-color);
    outline: 3px solid color-mix(in srgb, var(--pp-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(--pp-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(--pp-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(--pp-label-color);
    font-family: var(--pp-heading-font-family);
    font-size: var(--pp-heading-font-size);
    font-weight: var(--pp-heading-font-weight);
}

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

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

/* Visually hidden labels for the popup form fields. The fields show
   placeholders, which are not a reliable labeling mechanism on their own. */
.prayer-pop-screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
