/**
 * Front-end Dashboard Styles
 * Prospecting SaaS Plugin
 */

/* Login Page */
.prospecting-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 20px;
}

.prospecting-login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 400px;
    width: 100%;
}

.prospecting-login-box h2 {
    margin-top: 0;
    margin-bottom: 30px;
    text-align: center;
    color: #2271b1;
    font-size: 28px;
}

/* Dashboard */
.prospecting-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.ps-header h1 {
    margin: 0;
    color: #2271b1;
}

.ps-header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.ps-user-info {
    color: #666;
    font-weight: 500;
}

/* Tabs */
.ps-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.ps-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.ps-tab:hover {
    color: #2271b1;
    background: #f5f5f5;
}

.ps-tab.active {
    color: #2271b1;
    border-bottom-color: #2271b1;
    font-weight: 600;
}

/* Leads Grid */
.ps-leads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.ps-lead-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.ps-lead-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.ps-lead-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.ps-lead-score {
    background: #2271b1;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 18px;
}

.ps-lead-status {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

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

.ps-status-approved {
    background: #d4edda;
    color: #155724;
}

.ps-status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.ps-lead-name {
    margin: 0 0 5px 0;
    font-size: 20px;
    color: #333;
}

.ps-lead-title {
    margin: 0 0 5px 0;
    color: #666;
    font-weight: 500;
}

.ps-lead-company {
    margin: 0 0 15px 0;
    color: #999;
}

.ps-lead-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.ps-lead-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.ps-lead-date {
    font-size: 13px;
    color: #999;
}

/* Buttons */
.ps-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}

.ps-btn-primary {
    background: #2271b1;
    color: white;
}

.ps-btn-primary:hover {
    background: #135e96;
}

.ps-btn-secondary {
    background: #6c757d;
    color: white;
}

.ps-btn-secondary:hover {
    background: #5a6268;
}

.ps-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* Forms */
.ps-form-group {
    margin-bottom: 20px;
}

.ps-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.ps-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.ps-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

/* Alerts */
.ps-alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

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

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

/* Empty State */
.ps-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

/* Modal */
.ps-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ps-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.ps-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.ps-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    color: #999;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.ps-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

#ps-modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

#ps-modal-actions .ps-btn {
    flex: 1;
    padding: 15px;
    font-size: 16px;
}

/* Lead Details */
.ps-lead-details {
    margin-top: 20px;
}

.ps-detail-section {
    margin-bottom: 30px;
}

.ps-detail-section h3 {
    margin: 0 0 15px 0;
    color: #2271b1;
    font-size: 18px;
}

.ps-detail-table {
    width: 100%;
    border-collapse: collapse;
}

.ps-detail-table td {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.ps-detail-table td:first-child {
    width: 150px;
    color: #666;
}

.ps-score-badge {
    display: inline-block;
    background: #2271b1;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 18px;
    margin-bottom: 15px;
}

/* Message Variants */
.ps-message-variants {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ps-message-variant {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.ps-message-variant:hover {
    border-color: #2271b1;
    background: #f5f9fc;
}

.ps-message-variant input[type="radio"] {
    margin-right: 10px;
}

.ps-message-variant input[type="radio"]:checked ~ .ps-variant-label {
    color: #2271b1;
    font-weight: bold;
}

.ps-variant-label {
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 600;
}

.ps-message-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.ps-message-textarea:focus {
    outline: none;
    border-color: #2271b1;
}

.ps-char-count {
    text-align: right;
    font-size: 13px;
    color: #999;
    margin-top: 5px;
}

.ps-char-count.over-limit {
    color: #dc3545;
    font-weight: bold;
}

/* Loading */
.ps-loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 18px;
}

/* Responsive */
@media (max-width: 768px) {
    .ps-leads-grid {
        grid-template-columns: 1fr;
    }
    
    .ps-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .ps-tabs {
        flex-wrap: wrap;
    }
    
    .ps-modal-content {
        width: 95%;
        padding: 20px;
    }
    
    #ps-modal-actions {
        flex-direction: column;
    }
}

/* Login Footer */
.ps-login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.ps-login-footer a {
    color: #2271b1;
    text-decoration: none;
}

.ps-login-footer a:hover {
    text-decoration: underline;
}
