/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

@import "../../includes/common-stylesheet.css";

.pdf-download-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.preview-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--color-gray-600);
    font-weight: bold;
    margin-bottom: 10px;
}

.preview-divider::before,
.preview-divider::after {
    content: '';
    flex: 1;
    opacity: 0.25;
    border-bottom: 1px solid var(--color-gray-300);
}
.preview-divider::before {
    margin-right: 1rem;
}
.preview-divider::after {
    margin-left: 1rem;
}

.pcg_input_error_maxlength{
    display: none;
    color: var(--color-danger);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: -1.35rem;
}

.pcg-container {
    max-width: 950px;
    margin: 0 auto;
    text-align: center;
}

.pcg-form-content {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.pcg-left-column {
    flex: 1;
    max-width: 50%;
}

.pcg-right-column {
    flex: 1;
    position: sticky;
    top: 20px;
    margin: 0 auto;
}

.pdf-preview {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    width: 100%;
    /* Maintain aspect ratio of A4 */
    position: relative;
    padding-top: calc(141.42%); /* A4 ratio with some scaling */
}

.pdf-preview iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Responsive design for mobile devices */
@media (max-width: 768px) {
    .pcg-form-content {
        flex-direction: column;
    }

    .pcg-left-column {
        max-width: 100%;
    }

    .pcg-right-column {
        position: static;
        width: 100%;
    }
    
    .pdf-preview {
        max-width: 595px; /* Standard A4 width */
        margin: 0 auto;
    }
}

.pcg-container h2.pcg-title {
    align-items: center;
    display: flex;
    line-height: 1.75em;
    padding: 0 15px;
    background: #e52321;
    color: white;
    height: 60px;
    font-size: 1.5em;
}

.pcg-buttons.pcg-buttons-show-paid {
    display: none;
}

.pcg-container.pcg-container-show-paid {
    display: none;
}

.pcg-input-group {
    position: relative;
    margin-bottom: 1rem;
}

.pcg-input-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--ast-comment-inputs-background);
    padding: 0 4px;
    color: #757575;
    transition: all 0.2s ease;
    pointer-events: none;
}

.pcg-textinput {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.pcg-textinput:focus {
    outline: none;
    border-color: #555;
}

.pcg-textinput:focus + .pcg-input-label,
.pcg-textinput:not(:placeholder-shown) + .pcg-input-label {
    top: 0;
    font-size: 12px;
}

/* Adjust for textarea */
textarea.pcg-textinput + .pcg-input-label {
    top: 20px;
}