#pdm-sample-tool-wrapper {
    /* Variables */
    --pdm-primary: #0f172a;
    --pdm-primary-hover: #334155;
    --pdm-accent: #3b82f6;
    --pdm-bg: #ffffff;
    --pdm-surface: #f8fafc;
    --pdm-border: #e2e8f0;
    --pdm-text: #1e293b;
    --pdm-text-sub: #64748b;
    --pdm-success: #10b981;
    --pdm-error: #ef4444;
    --pdm-focus-ring: rgba(59, 130, 246, 0.15);

    font-family: 'Inter', -apple-system, sans-serif;
    max-width: 600px;
    margin: 40px auto;
    background: var(--pdm-bg);
    border: 1px solid var(--pdm-border);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    box-sizing: border-box;
}

#pdm-sample-tool-wrapper * {
    box-sizing: border-box;
}

/* Header */
.pdm-tool-header {
    background: var(--pdm-surface);
    padding: 36px 32px;
    border-bottom: 1px solid var(--pdm-border);
}

.pdm-tool-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: var(--pdm-text);
    font-weight: 700;
}

.pdm-tool-header p {
    margin: 0;
    color: var(--pdm-text-sub);
    font-size: 15px;
    line-height: 1.6;
}

/* Body */
.pdm-tool-body {
    padding: 32px;
}

.pdm-form-group {
    margin-bottom: 24px;
}

.pdm-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--pdm-text-sub);
    margin-bottom: 10px;
}

/* Cards */
.pdm-selection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pdm-select-card {
    position: relative;
    cursor: pointer;
}

.pdm-select-card input {
    position: absolute;
    opacity: 0;
}

.pdm-card-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px solid var(--pdm-border);
    border-radius: 12px;
    transition: all 0.2s ease;
    background: #fff;
}

.pdm-select-card input:checked+.pdm-card-inner {
    border-color: var(--pdm-accent);
    background: #eff6ff;
    box-shadow: 0 0 0 1px var(--pdm-accent);
}

.pdm-card-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--pdm-text);
}

/* Inputs */
.pdm-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    color: var(--pdm-text);
    background-color: #fff;
    border: 1px solid var(--pdm-border);
    border-radius: 8px;
}

.pdm-control:disabled {
    background-color: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.pdm-control:focus {
    border-color: var(--pdm-accent);
    outline: 0;
    box-shadow: 0 0 0 4px var(--pdm-focus-ring);
}

.pdm-control.error {
    border-color: var(--pdm-error);
    background-color: #fef2f2;
}

/* Layout */
.pdm-row-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 16px;
}

.pdm-helper-text {
    font-size: 13px;
    color: var(--pdm-text-sub);
    margin-top: 6px;
}

.pdm-error-msg {
    display: none;
    font-size: 13px;
    color: var(--pdm-error);
    margin-top: 6px;
    font-weight: 500;
}

/* Buttons */
.pdm-btn-primary {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background-color: var(--pdm-primary);
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pdm-btn-primary:hover {
    background-color: var(--pdm-primary-hover);
    transform: translateY(-1px);
}

.pdm-btn-primary:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.pdm-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Steps */
#pdm-step-2 {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.pdm-success-state {
    display: none;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.pdm-success-icon {
    width: 64px;
    height: 64px;
    background: #d1fae5;
    color: #059669;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

.pdm-download-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

.pdm-dl-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--pdm-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--pdm-text);
    transition: all 0.2s;
    font-weight: 600;
}

.pdm-dl-btn:hover {
    border-color: var(--pdm-accent);
    color: var(--pdm-accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.pdm-alert {
    padding: 16px;
    border-radius: 8px;
    margin-top: 24px;
    font-size: 14px;
    display: none;
}

.pdm-alert.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.pdm-alert.info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    margin-bottom: 20px;
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

#pdm-status-wrapper.hidden {
    opacity: 0.5;
    pointer-events: none;
}

.pdm-resend-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
    color: var(--pdm-text-sub);
    text-decoration: none;
    cursor: pointer;
}

.pdm-resend-link:hover {
    color: var(--pdm-accent);
    text-decoration: underline;
}

.pdm-resend-link.disabled {
    color: #ccc;
    cursor: default;
    text-decoration: none;
    pointer-events: none;
}