/**
 * Lead Connector Styles
 *
 * Custom CSS for the Lead Connector plugin.
 *
 * @package    local_ccp_leadconnector
 * @copyright  2025 Course Commerce Pro
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */

/* ==========================================================================
   Leaflet Map Styles
   ========================================================================== */

#leads-map {
    width: 100%;
    height: 400px;
    border-radius: 0.25rem;
    z-index: 1;
}

/* Marker Cluster Styles */
.marker-cluster {
    background-clip: padding-box;
    border-radius: 20px;
}

.marker-cluster div {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    margin-top: 5px;
    text-align: center;
    border-radius: 15px;
    font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-cluster span {
    line-height: 30px;
}

.marker-cluster-small {
    background-color: rgba(181, 226, 140, 0.6);
}
.marker-cluster-small div {
    background-color: rgba(110, 204, 57, 0.6);
    color: #fff;
}

.marker-cluster-medium {
    background-color: rgba(241, 211, 87, 0.6);
}
.marker-cluster-medium div {
    background-color: rgba(240, 194, 12, 0.6);
    color: #fff;
}

.marker-cluster-large {
    background-color: rgba(253, 156, 115, 0.6);
}
.marker-cluster-large div {
    background-color: rgba(241, 128, 23, 0.6);
    color: #fff;
}

/* Lead Popup */
.lead-popup {
    min-width: 100px;
}

.lead-popup strong {
    display: block;
    margin-bottom: 5px;
}

/* ==========================================================================
   Dashboard Styles
   ========================================================================== */

.lc-dashboard-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.lc-dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lc-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.lc-stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ==========================================================================
   Campaign List Styles
   ========================================================================== */

.lc-campaign-url {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8rem;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
}

.lc-campaign-badge {
    font-size: 0.7rem;
    margin-right: 4px;
}

/* ==========================================================================
   Lead List Styles
   ========================================================================== */

.lc-lead-anonymized {
    font-style: italic;
    color: #6c757d;
}

.lc-lead-duplicate {
    background-color: rgba(255, 193, 7, 0.1);
}

.lc-lead-flags .badge {
    font-size: 0.7rem;
    margin-right: 3px;
}

/* ==========================================================================
   Email Queue Styles
   ========================================================================== */

.lc-queue-error {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lc-queue-status {
    min-width: 80px;
}

/* ==========================================================================
   Form Styles (Public Pages)
   ========================================================================== */

.lc-form-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: #3a1123;
}

.lc-form-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 450px;
    width: 100%;
    padding: 2.5rem;
}

.lc-form-heading {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.lc-form-subheading {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.lc-form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.lc-form-input:focus {
    outline: none;
    border-color: var(--lc-primary-color, #4F46E5);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.lc-form-button {
    width: 100%;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background-color: #3a1123;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.lc-form-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(58, 17, 35, 0.4);
    background-color: #2d0d1b;
}

.lc-form-button:active {
    transform: translateY(0);
}

.lc-form-privacy {
    font-size: 0.75rem;
    color: #9ca3af;
    text-align: center;
    margin-top: 1rem;
}

/* ==========================================================================
   Success Page Styles
   ========================================================================== */

.lc-success-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: #3a1123;
}

.lc-success-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    padding: 3rem;
    text-align: center;
}

.lc-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.lc-success-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.lc-success-heading {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.lc-success-message {
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.lc-download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background-color: #3a1123;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.lc-download-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(58, 17, 35, 0.4);
    background-color: #2d0d1b;
    color: #ffffff;
    text-decoration: none;
}

.lc-email-note {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-top: 1.5rem;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 768px) {
    .lc-form-card,
    .lc-success-card {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .lc-form-heading,
    .lc-success-heading {
        font-size: 1.5rem;
    }
    
    #leads-map {
        height: 300px;
    }
}

/* ==========================================================================
   Admin Table Styles
   ========================================================================== */

.table-lc th {
    font-weight: 600;
    white-space: nowrap;
}

.table-lc .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.table-lc .badge {
    font-size: 0.75rem;
}

/* Chart container */
.lc-chart-container {
    position: relative;
    height: 200px;
}

.lc-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}
