/**
 * PinkDocs Button Block Styles
 */

.pinkdocs-button-wrapper {
    padding: 20px 0;
    display: flex;
}

/* Alignment */
.pinkdocs-button-align-left {
    justify-content: flex-start;
}

.pinkdocs-button-align-center {
    justify-content: center;
}

.pinkdocs-button-align-right {
    justify-content: flex-end;
}

.pinkdocs-button-width-auto {
    display: flex;
}

.pinkdocs-button-width-full .pinkdocs-cta-button {
    width: 100%;
    justify-content: center;
}

.pinkdocs-button-width-200 .pinkdocs-cta-button {
    width: 200px;
    justify-content: center;
}

.pinkdocs-button-width-300 .pinkdocs-cta-button {
    width: 300px;
    justify-content: center;
}

.pinkdocs-button-width-400 .pinkdocs-cta-button {
    width: 400px;
    justify-content: center;
}

.pinkdocs-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--pinkdocs-brand-color, #ff26ba);
    color: var(--pinkdocs-brand-text-color, #fff);
    border: none;
    border-radius: calc(var(--border-roundness, 8px) * 1.25);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.pinkdocs-cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.pinkdocs-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.pinkdocs-cta-button:hover::before {
    left: 100%;
}

.pinkdocs-cta-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Button Sizes */
.pinkdocs-button-small {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: var(--border-roundness, 8px);
}

.pinkdocs-button-medium {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: calc(var(--border-roundness, 8px) * 1.25);
}

.pinkdocs-button-large {
    padding: 18px 36px;
    font-size: 18px;
    border-radius: calc(var(--border-roundness, 8px) * 1.5);
}

/* Dark mode support */
[data-theme="dark"] .pinkdocs-cta-button {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .pinkdocs-cta-button:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* Editor Styles */
.pinkdocs-button-block-editor {
    margin: 20px 0;
}

.pinkdocs-button-block-editor .pinkdocs-cta-button {
    pointer-events: auto;
}

.pinkdocs-button-block-editor .pinkdocs-cta-button span {
    outline: none;
}

/* The docs header's "Get started" button shares the .pinkdocs-cta-button class and the template
   stylesheet loads later, which flattened every block button to the header size. Scoped to the
   block wrapper, the chosen size always applies. */
.pinkdocs-button-wrapper .pinkdocs-cta-button {
    gap: 8px;
    line-height: 1.3;
    font-weight: 600;
}
.pinkdocs-button-wrapper .pinkdocs-cta-button.pinkdocs-button-small {
    padding: 9px 18px;
    font-size: 14px;
    border-radius: var(--border-roundness, 8px);
}
.pinkdocs-button-wrapper .pinkdocs-cta-button.pinkdocs-button-medium {
    padding: 13px 26px;
    font-size: 16px;
    border-radius: calc(var(--border-roundness, 8px) * 1.25);
}
.pinkdocs-button-wrapper .pinkdocs-cta-button.pinkdocs-button-large {
    padding: 17px 36px;
    font-size: 18px;
    border-radius: calc(var(--border-roundness, 8px) * 1.5);
}
/* Keep the button a flex box (a page rule can reset it to block), so wide buttons centre their text */
.pinkdocs-button-wrapper .pinkdocs-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.pinkdocs-button-wrapper.pinkdocs-button-width-full .pinkdocs-cta-button { display: flex; width: 100%; }

/* Editor: the editor's link styling turned the button label blue and underlined */
.editor-styles-wrapper .pinkdocs-cta-button,
.editor-styles-wrapper .pinkdocs-cta-button *,
.pinkdocs-button-block-editor .pinkdocs-cta-button,
.pinkdocs-button-block-editor .pinkdocs-cta-button * {
    color: var(--pinkdocs-brand-text-color, #fff) !important;
    text-decoration: none !important;
}
.editor-styles-wrapper .pinkdocs-cta-button:hover,
.editor-styles-wrapper .pinkdocs-cta-button:focus { color: var(--pinkdocs-brand-text-color, #fff) !important; }
