/* Energy Installer Leads CRM Styles */

.eilc-contact-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.eilc-form-group {
    margin-bottom: 20px;
}

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

.eilc-form-group input,
.eilc-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.eilc-form-group input:focus,
.eilc-form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.eilc-submit-btn {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.eilc-submit-btn:hover {
    background: linear-gradient(135deg, #005a87 0%, #004466 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.eilc-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.eilc-success {
    color: #28a745;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 15px;
}

.eilc-error {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 15px;
}

/* Dashboard Styles */
.eilc-dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

.eilc-dashboard-container h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
}

.eilc-leads-list {
    display: grid;
    gap: 20px;
}

.eilc-lead-item {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.eilc-lead-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

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

.eilc-lead-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.eilc-lead-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

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

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

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

.eilc-lead-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
}

.eilc-lead-meta div {
    margin-bottom: 4px;
}

.eilc-lead-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.eilc-view-messages-btn,
.eilc-status-select {
    padding: 8px 16px;
    border: 2px solid #007cba;
    background: #007cba;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.eilc-view-messages-btn:hover,
.eilc-status-select:hover {
    background: #005a87;
    border-color: #005a87;
}

/* Modal Styles */
.eilc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eilc-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.eilc-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.eilc-modal-close:hover {
    color: #333;
}

/* Messages */
.eilc-messages-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.eilc-message {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    max-width: 80%;
}

.eilc-message-own {
    background: #007cba;
    color: white;
    margin-left: auto;
    text-align: right;
}

.eilc-message-other {
    background: #e9ecef;
    color: #333;
}

.eilc-message-content {
    margin-bottom: 8px;
    word-wrap: break-word;
}

.eilc-message-meta {
    font-size: 12px;
    opacity: 0.8;
}

/* Reply Form */
.eilc-reply-form,
.eilc-customer-reply-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.eilc-reply-form textarea,
.eilc-customer-reply-form textarea {
    flex: 1;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

.eilc-reply-form button,
.eilc-customer-reply-form button {
    padding: 12px 20px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.eilc-reply-form button:hover,
.eilc-customer-reply-form button:hover {
    background: #005a87;
}

/* Admin Styles */
.eilc-admin-container {
    margin-top: 20px;
}

.eilc-assignment-notice {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.eilc-assignment-notice p {
    margin: 0;
    color: #333;
}

.eilc-assignment-notice a {
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
}

.eilc-assignment-notice a:hover {
    text-decoration: underline;
}

.eilc-status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.eilc-assignment-info {
    color: #666;
    font-size: 11px;
    display: block;
    margin-top: 3px;
}

.eilc-reassign-lead {
    background: #f39c12 !important;
    color: white !important;
    border-color: #f39c12 !important;
}

.eilc-reassign-lead:hover {
    background: #e67e22 !important;
    border-color: #e67e22 !important;
}

.eilc-lead-info {
    margin: 20px 0;
}

.eilc-lead-info p {
    margin: 8px 0;
}

.eilc-lead-message,
.eilc-lead-messages {
    margin: 20px 0;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.eilc-message-item {
    margin-bottom: 16px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #007cba;
}

.eilc-message-item small {
    color: #666;
    font-size: 12px;
}

/* Customer Portal */
.eilc-customer-portal {
    max-width: 800px;
    margin: 0 auto;
}

.eilc-customer-leads {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.eilc-customer-lead {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
}

.eilc-customer-lead h3 {
    margin: 0 0 16px 0;
    color: #333;
}

.eilc-customer-lead button {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.eilc-customer-lead button:hover {
    background: #005a87;
}

/* Responsive Design */
@media (max-width: 768px) {
    .eilc-contact-form-container {
        padding: 20px;
        margin: 0 10px;
    }

    .eilc-lead-item {
        padding: 16px;
    }

    .eilc-lead-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .eilc-lead-actions {
        flex-direction: column;
        width: 100%;
    }

    .eilc-view-messages-btn,
    .eilc-status-select {
        width: 100%;
    }

    .eilc-modal-content {
        width: 95%;
        padding: 20px;
    }

    .eilc-reply-form,
    .eilc-customer-reply-form {
        flex-direction: column;
    }

    .eilc-reply-form textarea,
    .eilc-customer-reply-form textarea {
        min-height: 80px;
    }
}