/* PDF Download Section Styles */

.pdf-download-section {
    display: none;
    background: linear-gradient(135deg, #eef2ff 0%, #f0f4ff 100%);
    border: 2px solid var(--color-primary);
    border-radius: var(--border-radius-large);
    padding: 2rem;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

.pdf-download-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-primary);
}

.pdf-download-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.pdf-download-header .download-icon {
    font-size: 1.8rem;
    color: var(--color-primary);
}

.pdf-download-header h3 {
    font-family: var(--font-family-heading);
    font-size: 1.4rem;
    color: var(--color-primary);
    margin: 0;
}

.pdf-download-description {
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.pdf-download-form {
    max-width: 480px;
}

.pdf-form-group {
    margin-bottom: 1rem;
}

.pdf-form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
    color: var(--color-text);
}

.pdf-form-input {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--color-border, #e9ecef);
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-family: var(--font-family-primary);
    background: white;
    color: var(--color-text);
    box-sizing: border-box;
}

.pdf-form-input:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(72, 105, 255, 0.15);
}

/* Extra fields that appear for new subscribers */
.pdf-extra-fields {
    display: none;
    animation: slideDown 0.3s ease-out;
}

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

.pdf-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.pdf-checkbox {
    margin-top: 0.2rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--color-primary);
}

.pdf-checkbox-group label {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--color-text);
    cursor: pointer;
}

.pdf-checkbox-group label a {
    color: var(--color-primary);
    text-decoration: underline;
}

/* Download button */
.btn-pdf-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 480px;
    padding: 0.85rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family-primary);
}

.btn-pdf-download:hover:not(:disabled) {
    background: #1e3d6f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(72, 105, 255, 0.3);
}

.btn-pdf-download:disabled {
    background: #b0bec5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-pdf-download .btn-icon {
    font-size: 1.2rem;
}

/* Loading state */
.btn-pdf-download .btn-loading-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

.btn-pdf-download.is-loading .btn-text-content {
    display: none;
}

.btn-pdf-download.is-loading .btn-loading-spinner {
    display: inline-block;
}

.btn-pdf-download.is-loading .btn-loading-text {
    display: inline;
}

.btn-pdf-download .btn-loading-text {
    display: none;
}

/* Success state */
.btn-pdf-download.is-success {
    background: var(--color-success) !important;
}

.btn-pdf-download.is-success .btn-text-content {
    display: none;
}

.btn-pdf-download.is-success .btn-success-text {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-pdf-download .btn-success-text {
    display: none;
}

/* Messages */
.pdf-download-message {
    display: none;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    line-height: 1.4;
    max-width: 480px;
}

.pdf-download-message.success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid var(--color-success);
    color: #155724;
}

.pdf-download-message.error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid var(--color-danger);
    color: #721c24;
}

.pdf-download-message.info {
    background: rgba(72, 105, 255, 0.08);
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

/* Hint text */
.pdf-hint {
    font-size: 0.8rem;
    color: var(--color-text-light, #6c757d);
    margin-top: 0.75rem;
    max-width: 480px;
}

/* Gehaltsausgleich: Two buttons in details-toggle */
.details-toggle--with-pdf {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

/* Gehaltsausgleich: Collapsible PDF section */
.pdf-download-section--collapsible {
    margin-top: 0;
    padding: 0;
    border: none;
    background: none;
    overflow: visible;
}

.pdf-download-section--collapsible::before {
    display: none;
}

.pdf-download-section--collapsible .pdf-download-expandable {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out;
}

.pdf-download-section--collapsible.is-expanded .pdf-download-expandable {
    max-height: 700px;
}

.pdf-download-section--collapsible.is-expanded {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #eef2ff 0%, #f0f4ff 100%);
    border: 2px solid var(--color-primary);
    border-radius: var(--border-radius-large);
    position: relative;
    overflow: hidden;
}

.pdf-download-section--collapsible.is-expanded::before {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .pdf-download-section {
        padding: 1.5rem;
    }
    
    .pdf-download-section--collapsible.is-expanded {
        padding: 1.5rem;
    }
    
    .pdf-download-header h3 {
        font-size: 1.2rem;
    }
    
    .pdf-download-description {
        font-size: 0.9rem;
    }
}
