/**
 * leads-proximal.css
 * Stylesheet untuk frontend lead management
 */

/* Container utama */
.leads-proximal-container {
    font-family: 'Arial', sans-serif;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    color: white;
    background-color: #0e1521;
    border-radius: 8px;
}

/* Header section dengan chart */
.leads-header {
    margin-bottom: 30px;
}

.leads-chart-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.funnel-chart-box, .gauge-chart-box {
    flex: 1;
    background-color: #16202e;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.funnel-chart-box h2, .gauge-chart-box h2 {
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 600;
}

.funnel-chart-wrapper, .gauge-chart-wrapper {
    height: 300px;
    position: relative;
}

.add-lead-button-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.add-lead-btn {
    background-color: #16202e;
    color: white;
    border: 2px solid #3a4f6b;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 48px;
}

.add-lead-btn:hover {
    background-color: #3a4f6b;
}

/* Tabel Leads */
.leads-table-container {
    overflow-x: auto;
}

.leads-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #16202e;
    border-radius: 8px;
    overflow: hidden;
}

.leads-table th, .leads-table td {
    padding: 15px;
    text-align: left;
    border: 1px solid #101725;
}

.leads-table th {
    background-color: #15192a;
    color: white;
    font-weight: 600;
}

.leads-table tr:hover {
    background-color: #1e2b3c;
}

/* Progress Status */
.progress-status {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.progress-bar {
    height: 6px;
    width: 80%;
    border-radius: 3px;
}

/* Status colors */
.status-inquiry {
    background-color: #64e6e6;
    color: #0e1521;
}

.status-visit {
    background-color: #50c8e6;
    color: #0e1521;
}

.status-booking {
    background-color: #3caae6;
    color: #0e1521;
}

.status-movein {
    background-color: #288ce6;
    color: #0e1521;
}

.status-register {
    background-color: #146ee6;
    color: #0e1521;
}

.progress-status span {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    width: fit-content;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-buttons button {
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    border: none;
    transition: all 0.2s ease;
    font-weight: 600;
}

.update-lead-btn {
    background-color: #2ecc71;
    color: #0e1521;
}

.update-lead-btn:hover {
    background-color: #27ae60;
}

.invite-lead-btn {
    background-color: #f1c40f;
    color: #0e1521;
}

.invite-lead-btn:hover {
    background-color: #d4ac0d;
}

.delete-lead-btn {
    background-color: #e74c3c;
    color: #fff;
}

.delete-lead-btn:hover {
    background-color: #c0392b;
}

/* Modal styles */
.leads-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

.leads-modal-content {
    background-color: #1a2332 !important;
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    position: relative;
    color: #333;
}

.leads-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}

.leads-modal h2 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Form styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    background-color: #f9f9f9;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #3a4f6b;
    box-shadow: 0 0 5px rgba(58, 79, 107, 0.3);
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background-color: #0e1521;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: #3a4f6b;
}

/* Lead update info */
#updateLeadInfo {
    background-color: #f0f4f8;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

#updateLeadInfo p {
    margin: 5px 0;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .leads-chart-container {
        flex-direction: column;
    }
    
    .funnel-chart-box, .gauge-chart-box {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .leads-table th, .leads-table td {
        padding: 10px;
    }
    
    .leads-modal-content {
        width: 90%;
        margin: 20% auto;
        padding: 20px;
    }
}

/* Custom Bubble Funnel Styles */
.custom-funnel-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    min-height: 120px;
}

.funnel-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.funnel-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4285f4, #34a853);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
    transition: all 0.3s ease;
    transform: scale(0.8);
    opacity: 0.7;
}

.funnel-bubble.animate {
    transform: scale(1);
    opacity: 1;
}

.funnel-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
}

.funnel-number {
    color: white;
    font-weight: bold;
    font-size: 18px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.funnel-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: center;
    white-space: nowrap;
}

.funnel-arrow {
    font-size: 24px;
    color: #666;
    font-weight: bold;
    margin: 0 10px;
    align-self: flex-start;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.funnel-arrow:hover {
    color: #4285f4;
    transform: scale(1.2);
}

/* Different colors for each step */
.funnel-step[data-step="inquiry"] .funnel-bubble {
    background: linear-gradient(135deg, #4285f4, #1a73e8);
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
}

.funnel-step[data-step="visit"] .funnel-bubble {
    background: linear-gradient(135deg, #34a853, #137333);
    box-shadow: 0 4px 15px rgba(52, 168, 83, 0.3);
}

.funnel-step[data-step="booking"] .funnel-bubble {
    background: linear-gradient(135deg, #fbbc04, #f9ab00);
    box-shadow: 0 4px 15px rgba(251, 188, 4, 0.3);
}

.funnel-step[data-step="movein"] .funnel-bubble {
    background: linear-gradient(135deg, #ea4335, #d33b2c);
    box-shadow: 0 4px 15px rgba(234, 67, 53, 0.3);
}

.funnel-step[data-step="register"] .funnel-bubble {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .custom-funnel-container {
        flex-direction: row;
        gap: 5px;
        padding: 15px;
    }
    
    .funnel-arrow {
         font-size: 10px;
        margin: 2px 2px 2px 2px;
        align-self: center;
    }
    
    .funnel-bubble {
        
        width: 20px;
        height: 20px;
    }
    
    .funnel-number {
        font-size: 10px;
    }
    
    .funnel-label {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .custom-funnel-container {
        gap: 2px;
        padding: 10px;
    }
    
    .funnel-bubble {
        width: 35px;
        height: 35px;
    }
    
    .funnel-number {
        font-size: 15px;
    }
    
    .funnel-label {
        font-size: 11px;
    }
    
    .funnel-arrow {
        font-size: 13px;
        margin: 0px 0px 20px 0px;
    }
}

/* Animation for data updates */
@keyframes bubblePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.funnel-bubble.updated {
    animation: bubblePulse 0.6s ease-in-out;
}

/* Hover effects for better interactivity */
.funnel-step:hover .funnel-bubble {
    transform: scale(1.1);
}

.funnel-step:hover .funnel-label {
    color: #4285f4;
    font-weight: 700;
}

/* Dark theme support (if needed) */
@media (prefers-color-scheme: dark) {
    .funnel-label {
        color: #e8eaed;
    }
    
    .funnel-arrow {
        color: #9aa0a6;
    }
    
    .funnel-arrow:hover {
        color: #8ab4f8;
    }
    
    .funnel-step:hover .funnel-label {
        color: #8ab4f8;
    }
}

/* Integration with existing leads-proximal styles */
.funnel-chart-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 150px;
    width: 100%;
}

.funnel-chart-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.funnel-chart-box h2 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}