/* -- Form: Powiadomienia o podcastach ---------------------------------------
   Field/consent/select styling copied 1:1 from form-diagnosis (.fd-*) - same
   dark-theme form system used site-wide, renamed to .fp-* here. Single
   column (no summary sidebar), matching the Figma "Formularz zapisu na
   powiadomienia" pages. -------------------------------------------------- */

.fp-block {
    padding: 96px 0;
    background: var(--wp--preset--color--dark, #2E2E39);
    color: var(--wp--preset--color--white);
}

.fp-layout {
    display: flex;
    flex-direction: column;
    max-width: 560px;
}

.fp-layout--with-sidebar {
    flex-direction: row;
    align-items: flex-start;
    gap: 80px;
    max-width: none;
}

.fp-form-col {
    flex: 1 0 0;
    min-width: 0;
    max-width: 640px;
}

.fp-sidebar {
    flex-shrink: 0;
    width: 480px;
    margin-top: 0;
}

.fp-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background: var(--wp--preset--color--black);
    border-radius: 16px;
}

.fp-summary-title {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: var(--wp--preset--color--neutral-200);
}

.fp-summary-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--wp--preset--color--black);
    border: 1px solid var(--wp--preset--color--neutral-300);
    border-radius: 4px;
}

.fp-summary-item-icon {
    flex-shrink: 0;
    display: flex;
    color: var(--wp--preset--color--pink-500, #DF006E);
}

.fp-summary-item-icon svg {
    width: 20px;
    height: 20px;
}

.fp-summary-item-name {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: var(--wp--preset--color--white);
}

.fp-summary-item-note {
    margin: 0;
    font-size: 12px;
    font-weight: 300;
    line-height: 1.4;
    color: var(--wp--preset--color--neutral-200);
}

/* -- Header ------------------------------------------------------------- */

.fp-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.fp-header[hidden] {
    display: none;
}

.fp-title {
    margin: 0;
    font-size: 32px;
    font-weight: 400;
    line-height: 1;
    color: var(--wp--preset--color--white);
}

.fp-header-line {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.fp-desc {
    margin: 0;
    font-size: 16px;
    font-weight: 300;
    line-height: 24px;
    color: var(--wp--preset--color--neutral-100);
}

/* -- Section label -------------------------------------------------------- */

.fp-section-label-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 24px;
}

.fp-form > .fp-section-label-row + .fp-section-label-row {
    margin-top: 32px;
}

.fp-section-label {
    font-size: 16px;
    font-weight: 300;
    color: var(--wp--preset--color--neutral-100);
    line-height: 24px;
}

.fp-section-line {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

/* -- Fields ----------------------------------------------------------------- */

.fp-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.fp-input,
.fp-select {
    width: 100%;
    height: 56px;
    box-sizing: border-box;
    padding: 0 24px;
    background: var(--wp--preset--color--black);
    border: none;
    border-radius: 4px;
    color: var(--wp--preset--color--white);
    font-family: inherit;
    font-size: 14px;
    font-weight: 300;
    line-height: 20px;
    outline: none;
    transition: box-shadow 0.15s, padding-top 0.15s ease, padding-bottom 0.15s ease;
}

.fp-input:focus,
.fp-input:not(:placeholder-shown),
.fp-select-wrap.is-floated .fp-select {
    padding-top: 18px;
    padding-bottom: 0;
}

.fp-input:focus,
.fp-select:focus {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.fp-input.fp-invalid,
.fp-select.fp-invalid {
    box-shadow: inset 0 0 0 1px #fc8181;
}

/* Autofill styling for .fp-input/.fp-select lives in the global rule in
   assets/css/style.css alongside every other custom form on the site. */

.fp-error-tip {
    display: block;
    position: absolute;
    margin-top: 0;
    font-size: 12px;
    font-weight: 300;
    line-height: 16px;
    color: #fc8181;
}

.fp-select-wrap {
    position: relative;
}

.fp-select {
    appearance: none;
    cursor: pointer;
    padding-right: 48px;
}

.fp-select:invalid {
    color: rgba(255, 255, 255, 0.5);
}

.fp-select option {
    background: var(--wp--preset--color--black);
    color: var(--wp--preset--color--white);
}

.fp-chevron {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: var(--wp--preset--color--white);
    pointer-events: none;
}

/* -- Floating labels (identical mechanism to the newsletter form) --------- */

.fp-field {
    position: relative;
}

.fp-field-label,
.fp-select-label {
    position: absolute;
    left: 24px;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 300;
    line-height: 20px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    transition: top 0.15s ease, font-size 0.15s ease, transform 0.15s ease, color 0.15s ease, line-height 0.15s ease;
}

.fp-select-label {
    right: 48px;
}

.fp-label-req {
    color: inherit;
}

.fp-input:focus + .fp-field-label,
.fp-input:not(:placeholder-shown) + .fp-field-label,
.fp-select-wrap.is-floated .fp-select-label {
    top: 10px;
    transform: none;
    font-size: 10px;
    line-height: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* -- Consent checkbox -------------------------------------------------------- */

.fp-consent {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 0 0;
    cursor: pointer;
}

.fp-consent-cb {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fp-consent-box {
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 3px;
}

.fp-consent-cb:checked~.fp-consent-box {
    background: var(--wp--preset--color--pink-500, #DF006E);
    border-color: var(--wp--preset--color--pink-500, #DF006E);
}

.fp-consent-cb:checked~.fp-consent-box::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid var(--wp--preset--color--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.fp-consent-cb.fp-invalid~.fp-consent-box {
    border-color: #fc8181;
}

.fp-consent-body {
    display: flex;
    gap: 4px;
    font-size: 13px;
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
}

.fp-consent-required-mark {
    flex-shrink: 0;
    color: #ff2126;
}

.fp-consent-body p {
    margin: 0;
}

.fp-consent-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fp-consent.is-expanded .fp-consent-clamp {
    -webkit-line-clamp: unset;
    overflow: visible;
}

.fp-consent-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--wp--preset--color--white);
    cursor: pointer;
}

.fp-consent.is-expanded .fp-consent-more svg {
    transform: rotate(180deg);
}

/* -- Footer / buttons -------------------------------------------------------- */

.fp-required-note {
    margin: 0;
    font-size: 16px;
    font-weight: 300;
    line-height: 24px;
    color: var(--wp--preset--color--neutral-100);
}

.fp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
}

.fp-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: transparent;
    border: 1px solid var(--wp--preset--color--white);
    color: var(--wp--preset--color--white);
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.fp-submit-btn:hover {
    background: var(--wp--preset--color--white);
    color: var(--wp--preset--color--black, #1A1A25);
}

.fp-submit-btn:disabled {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

.fp-submit-btn.is-loading {
    position: relative;
    color: transparent !important;
}

.fp-submit-btn.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: var(--wp--preset--color--white);
    border-radius: 50%;
    animation: fp-btn-spin 0.6s linear infinite;
}

@keyframes fp-btn-spin {
    to {
        transform: rotate(360deg);
    }
}

.fp-msg {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 4px;
    background: rgba(252, 129, 129, 0.12);
    border: 1px solid rgba(252, 129, 129, 0.35);
    color: #fc8181;
    font-size: 14px;
}

.fp-msg.fp-msg--success {
    background: rgba(46, 204, 113, 0.12);
    border-color: rgba(46, 204, 113, 0.4);
    color: #7be2a5;
}

/* -- Thank you ---------------------------------------------------------------- */

.fp-thankyou-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.fp-thankyou-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--wp--preset--color--white);
}

.fp-thankyou-icon svg {
    width: 32px;
    height: 32px;
}

.fp-thankyou-head .fp-title {
    margin: 0;
    font-size: 32px;
    font-weight: 400;
}

.fp-thankyou .fp-header-line {
    margin-bottom: 24px;
}

/* -- Mobile --------------------------------------------------------------------- */

@media (max-width: 992px) {
    .fp-layout--with-sidebar {
        flex-direction: column;
    }

    .fp-form-col {
        max-width: 100%;
    }

    .fp-sidebar {
        width: 100%;
        order: -1;
        margin-top: 0;
    }
}

@media (max-width: 600px) {
    .fp-block {
        padding: 48px 0;
    }

    .fp-title {
        font-size: 26px;
    }

    .fp-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .fp-submit-btn {
        justify-content: center;
        width: 100%;
    }
}
