/**
 * LinkedIn Profile Processor - Styles with Credit System
 */

.linkedin-processor-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Login Notice Styles */
.lpp-login-notice {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.lpp-login-notice p {
    margin: 10px 0;
    font-size: 16px;
}

/* Credit Display Styles */
.lpp-credit-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.credit-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.credit-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 20px;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
}

.credit-icon {
    font-size: 24px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.credit-note {
    opacity: 0.9;
    font-style: italic;
}

.credit-note small {
    font-size: 14px;
}

/* URL Count Info */
.url-count-info {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
}

.url-count-info span {
    font-weight: 500;
}

#credits-needed {
    font-weight: 700;
    color: #2271b1;
}

/* Insufficient Credits Warning */
.insufficient-credits {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
}

/* Updated Button States */
.lpp-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.lpp-button.insufficient-credits {
    background-color: #dc3545;
    border-color: #dc3545;
}

.lpp-button.insufficient-credits:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Rest of the existing styles */
.lpp-form-wrapper {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.lpp-results-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
    max-width: 100%;
}

.lpp-results-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
}

.lpp-results-table th,
.lpp-results-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
    word-break: break-word;
    max-width: 200px;
}

.lpp-results-table th:nth-child(1), 
.lpp-results-table td:nth-child(1) {
    width: 15%;
}

.lpp-results-table th:nth-child(2), 
.lpp-results-table td:nth-child(2),
.lpp-results-table th:nth-child(6), 
.lpp-results-table td:nth-child(6) {
    width: 20%;
}

.lpp-results-table th:nth-child(3), 
.lpp-results-table td:nth-child(3) {
    width: 15%;
}

.lpp-results-table th:nth-child(4), 
.lpp-results-table td:nth-child(4) {
    width: 10%;
}

.lpp-results-table th:nth-child(5), 
.lpp-results-table td:nth-child(5),
.lpp-results-table th:nth-child(7), 
.lpp-results-table td:nth-child(7) {
    width: 20%;
}

.lpp-form-container {
    padding: 24px;
}

#linkedin-processor-form {
    position: relative;
}

#linkedin-processor-form.loading .button-text {
    display: none;
}

#linkedin-processor-form.loading .button-loader {
    display: flex;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
}

.lpp-button {
    display: inline-block;
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lpp-button-primary {
    background-color: #2271b1;
    color: #fff;
    position: relative;
}

.lpp-button-primary:hover {
    background-color: #135e96;
}

.lpp-button-secondary {
    background-color: #f0f0f1;
    color: #2c3338;
}

.lpp-button-secondary:hover {
    background-color: #dcdcde;
}

.lpp-button-success {
    background-color: #00a32a;
    color: #fff;
}

.lpp-button-success:hover {
    background-color: #008a20;
}

.button-loader {
    display: none;
    justify-content: center;
    align-items: center;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.lpp-results-container {
    padding: 24px;
    border-top: 1px solid #eee;
}

.lpp-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.lpp-results-header h3 {
    margin: 0;
    font-size: 18px;
}

.lpp-processing-status {
    display: flex;
    align-items: center;
    gap: 24px;
}

.lpp-status-indicator {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.status-text {
    font-weight: 600;
    color: #2271b1;
}

.progress-bar-container {
    width: 200px;
    height: 10px;
    background-color: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #2196F3;
    width: 0%;
    transition: width 0.3s ease;
}

.lpp-time-taken span {
    display: inline-block;
}

.time-counter {
    font-weight: 600;
}

.lpp-results-content {
    margin-top: 20px;
}

.lpp-results-table th {
    background-color: #f9f9f9;
    font-weight: 600;
}

.lpp-results-table tr:hover {
    background-color: #f5f5f5;
}

.lpp-results-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.lpp-results-summary {
    font-size: 14px;
    color: #666;
}

.lpp-download-actions {
    display: flex;
    gap: 10px;
}

.error-message {
    color: #d63638;
    text-align: center;
    padding: 10px;
}

/* Credit Update Animation */
.credit-count.updating {
    animation: creditUpdate 0.5s ease-in-out;
}

@keyframes creditUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); background: rgba(255, 255, 255, 0.4); }
    100% { transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .lpp-credit-display {
        padding: 16px;
    }
    
    .credit-info {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .url-count-info {
        flex-direction: column;
        gap: 5px;
    }
    
    .lpp-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .lpp-processing-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .lpp-results-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .lpp-download-actions {
        width: 100%;
    }
    
    .lpp-download-actions .lpp-button {
        flex: 1;
    }
}