/* ══════════════════════════════════════════════════════════════════════════════
   MODAL PDF DOWNLOAD - Premium Design
   ══════════════════════════════════════════════════════════════════════════════ */
.ps64-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 15, 30, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--ps64-space-4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ps64-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ps64-modal {
    background: var(--ps64-surface);
    border-radius: var(--ps64-radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 440px;
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.ps64-modal-overlay.active .ps64-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.ps64-modal-header {
    background: linear-gradient(135deg, var(--ps64-navy) 0%, var(--ps64-navy-dark) 100%);
    padding: var(--ps64-space-6);
    text-align: center;
    position: relative;
}

.ps64-modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--ps64-teal);
    border-radius: 2px;
}

.ps64-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--ps64-space-4);
    background: rgba(59, 170, 254, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(59, 170, 254, 0.3);
}

.ps64-modal-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--ps64-teal);
}

.ps64-modal-title {
    font-size: var(--ps64-text-lg);
    font-weight: 700;
    color: var(--ps64-text-inverse);
    margin: 0 0 var(--ps64-space-2);
}

.ps64-modal-subtitle {
    font-size: var(--ps64-text-sm);
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.5;
}

.ps64-modal-body {
    padding: var(--ps64-space-6);
}

.ps64-modal-app-name {
    font-size: var(--ps64-text-sm);
    font-weight: 600;
    color: var(--ps64-text);
    background: var(--ps64-bg);
    padding: var(--ps64-space-3) var(--ps64-space-4);
    border-radius: var(--ps64-radius-md);
    margin-bottom: var(--ps64-space-5);
    display: flex;
    align-items: center;
    gap: var(--ps64-space-3);
    border: 1px solid var(--ps64-border-light);
}

.ps64-modal-app-name svg {
    width: 18px;
    height: 18px;
    stroke: var(--ps64-teal);
    flex-shrink: 0;
}

.ps64-modal-form {
    display: flex;
    flex-direction: column;
    gap: var(--ps64-space-4);
}

.ps64-input-group {
    position: relative;
}

.ps64-input-group label {
    display: block;
    font-size: var(--ps64-text-xs);
    font-weight: 600;
    color: var(--ps64-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--ps64-space-2);
}

.ps64-input-group input {
    width: 100%;
    padding: var(--ps64-space-4);
    padding-left: 44px;
    font-size: var(--ps64-text-base);
    font-family: var(--ps64-font);
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.ps64-input-group input:focus {
    outline: none;
    border-color: #3BAAFE;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(59, 170, 254, 0.15);
}

.ps64-input-group input::placeholder {
    color: var(--ps64-text-light);
}

.ps64-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(calc(-50% + 10px));
    width: 20px;
    height: 20px;
    stroke: var(--ps64-text-light);
    pointer-events: none;
    transition: stroke var(--ps64-duration-base) var(--ps64-ease);
}

.ps64-input-group input:focus + .ps64-input-icon {
    stroke: var(--ps64-teal);
}

.ps64-input-error {
    font-size: var(--ps64-text-xs);
    color: #ef4444;
    margin-top: var(--ps64-space-2);
    display: none;
}

.ps64-input-group.error input {
    border-color: #ef4444;
}

.ps64-input-group.error .ps64-input-error {
    display: block;
}

.ps64-modal-footer {
    display: flex;
    gap: var(--ps64-space-3);
    padding: 0 var(--ps64-space-6) var(--ps64-space-6);
}

.ps64-modal-btn {
    flex: 1;
    padding: var(--ps64-space-4);
    font-size: var(--ps64-text-base);
    font-weight: 600;
    font-family: var(--ps64-font);
    border-radius: var(--ps64-radius-md);
    cursor: pointer;
    transition: all var(--ps64-duration-base) var(--ps64-ease);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--ps64-space-2);
    border: none;
}

.ps64-modal-btn-primary {
    background: linear-gradient(135deg, #3BAAFE 0%, #2B9AEE 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(59, 170, 254, 0.35);
}

.ps64-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 170, 254, 0.45);
}

.ps64-modal-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ps64-modal-btn-secondary {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.ps64-modal-btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.ps64-modal-btn svg {
    width: 18px;
    height: 18px;
}

.ps64-modal-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: ps64-spin 0.8s linear infinite;
    display: none;
}

.ps64-modal-btn-primary.loading .ps64-modal-spinner {
    display: block;
}

.ps64-modal-btn-primary.loading svg {
    display: none;
}

.ps64-modal-privacy {
    font-size: var(--ps64-text-xs);
    color: var(--ps64-text-light);
    text-align: center;
    padding: 0 var(--ps64-space-6) var(--ps64-space-4);
    line-height: 1.5;
}

.ps64-modal-privacy a {
    color: var(--ps64-teal);
    text-decoration: none;
}

.ps64-modal-privacy a:hover {
    text-decoration: underline;
}

.ps64-modal-close {
    position: absolute;
    top: var(--ps64-space-4);
    right: var(--ps64-space-4);
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--ps64-duration-fast) var(--ps64-ease);
}

.ps64-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ps64-modal-close svg {
    width: 16px;
    height: 16px;
    stroke: rgba(255, 255, 255, 0.8);
}

/* Success state */
.ps64-modal-success {
    text-align: center;
    padding: var(--ps64-space-8) var(--ps64-space-6);
    display: none;
}

.ps64-modal.success .ps64-modal-header,
.ps64-modal.success .ps64-modal-body,
.ps64-modal.success .ps64-modal-footer,
.ps64-modal.success .ps64-modal-privacy {
    display: none;
}

.ps64-modal.success .ps64-modal-success {
    display: block;
}

.ps64-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--ps64-space-5);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.ps64-success-icon svg {
    width: 36px;
    height: 36px;
    stroke: #10b981;
}

.ps64-success-title {
    font-size: var(--ps64-text-lg);
    font-weight: 700;
    color: var(--ps64-text);
    margin-bottom: var(--ps64-space-2);
}

.ps64-success-text {
    font-size: var(--ps64-text-sm);
    color: var(--ps64-text-muted);
    margin-bottom: var(--ps64-space-5);
    line-height: 1.6;
}

.ps64-success-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #3BAAFE 0%, #2B9AEE 100%) !important;
    color: #ffffff !important;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(59, 170, 254, 0.35);
    transition: all 0.2s ease;
}

.ps64-success-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 170, 254, 0.45);
}

.ps64-success-btn svg {
    width: 18px;
    height: 18px;
}
