/**
 * Frontend Styles - Two-Step Lead Capture Form
 *
 * @package PharmaIngestor
 */

/* Form Wrapper */
.pi-submit-form-wrapper {
    max-width: 650px;
    margin: 40px auto;
    padding: 0;
}

.pi-form-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
}

/* Form Steps */
.pi-form-step {
    display: none;
    padding: 50px 60px;
    animation: fadeIn 0.4s ease-in-out;
}

.pi-form-step.pi-step-active {
    display: block;
}

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

/* Form Header */
.pi-form-header {
    text-align: center;
    margin-bottom: 40px;
}

.pi-form-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    line-height: 1.2;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pi-form-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Form Groups */
.pi-form-group {
    margin-bottom: 24px;
}

.pi-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

/* Input Wrapper with Icon */
.pi-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.pi-input-icon {
    position: absolute;
    left: 18px;
    font-size: 20px;
    pointer-events: none;
    z-index: 1;
}

/* Inputs */
.pi-input {
    width: 100%;
    padding: 16px 18px 16px 52px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.pi-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.pi-input-large {
    padding: 18px 20px 18px 54px;
    font-size: 18px;
}

.pi-help-text {
    font-size: 14px;
    color: #888;
    margin: 8px 0 0 0;
    line-height: 1.4;
}

/* Buttons */
.pi-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-decoration: none;
}

.pi-button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.pi-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.pi-button-primary:active {
    transform: translateY(0);
}

.pi-button-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pi-button-primary.pi-submitting {
    background: linear-gradient(135deg, #8896e8 0%, #9570b0 100%);
    cursor: wait;
    pointer-events: none;
}

.pi-button-large {
    width: 100%;
    padding: 18px 32px;
    font-size: 18px;
}

.pi-button-animated .pi-button-icon {
    transition: transform 0.3s ease;
}

.pi-button-animated:hover .pi-button-icon {
    transform: translateX(4px);
}

.pi-button-small {
    padding: 6px 12px;
    font-size: 14px;
}

/* Validated URL Display */
.pi-validated-url {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pi-url-icon {
    font-size: 20px;
    color: #28a745;
}

.pi-url-text {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    word-break: break-all;
}

.pi-link-button {
    background: none;
    border: none;
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.pi-link-button:hover {
    color: #764ba2;
}

/* Privacy Note */
.pi-privacy-note {
    text-align: center;
    font-size: 13px;
    color: #888;
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pi-privacy-icon {
    font-size: 14px;
}

/* Messages */
.pi-message {
    padding: 12px 16px;
    margin-top: 20px;
    border-radius: 4px;
    font-size: 14px;
}

.pi-message-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.pi-message-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.pi-message-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Status Page */
.pi-status-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
}

.pi-status-page-wrapper h2 {
    margin-bottom: 30px;
    font-size: 28px;
    color: #333;
}

.pi-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.pi-empty-state p {
    font-size: 16px;
    color: #666;
}

/* Jobs Table */
.pi-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pi-table thead {
    background: #f5f5f5;
}

.pi-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.pi-table td {
    padding: 16px;
    border-bottom: 1px solid #eee;
}

.pi-table tbody tr:hover {
    background: #f9f9f9;
}

/* Status Badges */
.pi-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.pi-status-pending {
    background: #fff3cd;
    color: #856404;
}

.pi-status-awaiting_verify {
    background: #d1ecf1;
    color: #0c5460;
}

.pi-status-queued {
    background: #cce5ff;
    color: #004085;
}

.pi-status-running {
    background: #d4edda;
    color: #155724;
}

.pi-status-succeeded {
    background: #28a745;
    color: #fff;
}

.pi-status-failed {
    background: #f8d7da;
    color: #721c24;
}

.pi-status-cancelled {
    background: #e2e3e5;
    color: #383d41;
}

/* Spinner */
.pi-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: pi-spin 1s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

.pi-loader { text-align: center; margin-top: 8px; }

@keyframes pi-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pi-processing-text {
    color: #666;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .pi-form-step {
        padding: 40px 30px;
    }

    .pi-form-title {
        font-size: 26px;
    }

    .pi-form-subtitle {
        font-size: 15px;
    }

    .pi-status-page-wrapper {
        padding: 20px;
    }

    .pi-table {
        font-size: 14px;
    }

    .pi-table th,
    .pi-table td {
        padding: 12px 8px;
    }
}

@media (max-width: 480px) {
    .pi-submit-form-wrapper {
        margin: 20px auto;
    }

    .pi-form-step {
        padding: 30px 20px;
    }

    .pi-form-title {
        font-size: 22px;
    }

    .pi-input-large {
        font-size: 16px;
        padding: 16px 18px 16px 50px;
    }

    .pi-button-large {
        font-size: 16px;
        padding: 16px 24px;
    }
}

