/**
 * PDF Download Form - Styles
 * Author: Mustaf (https://mustaf.com/)
 * Kolor akcentu: #D1B8B1
 */

/* Container główny */
.pdf-download-form-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
}

.pdf-form-wrapper {
    background: rgba(40, 40, 40, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(209, 184, 177, 0.15);
    border: 1px solid rgba(209, 184, 177, 0.2);
}

/* Tytuł formularza */
.pdf-form-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 30px 0;
    text-align: center;
    line-height: 1.3;
}

/* Formularz */
.pdf-download-form {
    margin: 0;
}

/* Rząd z polami (np. imię + nazwisko) */
.pdf-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .pdf-form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Pojedyncze pole */
.pdf-form-field {
    margin-bottom: 24px;
}

.pdf-form-field-half {
    flex: 1;
    margin-bottom: 24px;
}

.pdf-form-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 8px;
}

.pdf-form-field input[type="text"],
.pdf-form-field input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    color: #333333;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.pdf-form-field input[type="text"]:focus,
.pdf-form-field input[type="email"]:focus {
    outline: none;
    border-color: #D1B8B1;
    box-shadow: 0 0 0 3px rgba(209, 184, 177, 0.2);
}

.pdf-form-field input[type="text"]::placeholder,
.pdf-form-field input[type="email"]::placeholder {
    color: #999999;
}

/* Gwiazdka wymagane pole */
.required {
    color: #e74c3c;
    font-weight: 700;
}

/* Zgody */
.pdf-form-consents {
    margin: 30px 0 20px 0;
    padding: 20px;
    background: rgba(50, 50, 50, 0.5);
    border-radius: 8px;
    border-left: 4px solid #D1B8B1;
}

.pdf-form-checkbox {
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
}

.pdf-form-checkbox:last-child {
    margin-bottom: 0;
}

.pdf-form-checkbox input[type="checkbox"] {
    margin: 4px 12px 0 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #D1B8B1;
}

.pdf-form-checkbox label {
    font-size: 14px;
    line-height: 1.5;
    color: #d0d0d0;
    cursor: pointer;
    margin: 0;
}

.pdf-form-checkbox label a {
    color: #D1B8B1;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.pdf-form-checkbox label a:hover {
    color: #b99a93;
    text-decoration: underline;
}

/* reCAPTCHA */
.pdf-form-recaptcha {
    margin: 25px 0;
    display: flex;
    justify-content: center;
}

.pdf-form-recaptcha .g-recaptcha {
    display: inline-block;
}

/* Przycisk submit */
.pdf-form-submit {
    margin: 30px 0 15px 0;
}

.pdf-download-form-container .pdf-download-form .pdf-form-button {
    width: 100%;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    background: #D1B8B1;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(209, 184, 177, 0.4);
    font-family: inherit;
}

.pdf-download-form-container .pdf-download-form .pdf-form-button:hover {
    background: #b99a93;
    box-shadow: 0 6px 16px rgba(209, 184, 177, 0.5);
    transform: translateY(-2px);
}

.pdf-download-form-container .pdf-download-form .pdf-form-button:active {
    transform: translateY(0);
}

.pdf-download-form-container .pdf-download-form .pdf-form-button:disabled {
    background: #666666;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Loader w przycisku */
.spinner {
    animation: rotate 2s linear infinite;
    width: 20px;
    height: 20px;
}

.spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Uwaga o polach wymaganych */
.pdf-form-note {
    font-size: 13px;
    color: #b0b0b0;
    margin: 0;
    text-align: center;
}

/* Wiadomości (sukces/błąd) */
.pdf-form-messages {
    margin-bottom: 20px;
}

.pdf-form-message {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    animation: slideDown 0.3s ease;
}

.pdf-form-message:last-child {
    margin-bottom: 0;
}

.pdf-form-message.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.pdf-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsywność */
@media (max-width: 768px) {
    .pdf-form-wrapper {
        padding: 30px 20px;
    }
    
    .pdf-form-title {
        font-size: 24px;
    }
    
    .pdf-form-consents {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .pdf-download-form-container {
        padding: 10px;
        margin: 20px auto;
    }
    
    .pdf-form-wrapper {
        padding: 25px 15px;
    }
    
    .pdf-form-title {
        font-size: 22px;
    }
    
    .pdf-download-form-container .pdf-download-form .pdf-form-button {
        padding: 14px 24px;
        font-size: 15px;
    }
}

/* Stany walidacji HTML5 */
.pdf-form-field input:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
}

.pdf-form-field input:valid:not(:placeholder-shown) {
    border-color: #27ae60;
}

