/* Pipedrive CRM Integration Styles - Version 1.1.0 */

.pipedrive-crm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Address Filter Section */
.address-filter-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.address-filter-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.filter-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.postcode-select {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    min-width: 200px;
    background: white;
    transition: border-color 0.2s ease;
}

.postcode-select:focus {
    outline: none;
    border-color: #007bff;
}

.filter-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.filter-btn:hover {
    background: #0056b3;
}

/* Enhanced Slider Styles */
.pipedrive-slider-container {
    margin-bottom: 40px;
}

.pipedrive-slider-container h3 {
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
}

.pipedrive-slider {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px 0;
}

.slider-content {
    display: flex;
    gap: 20px;
    padding: 0 20px;
    transition: transform 0.5s ease;
    position: relative;
}

.slider-content::-webkit-scrollbar {
    display: none;
}

.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 10px;
}

.slider-prev,
.slider-next {
    background: rgba(0, 123, 255, 0.9);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    pointer-events: all;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-prev:hover,
.slider-next:hover {
    background: rgba(0, 86, 179, 0.9);
}

.slider-prev {
    left: 10px;
}

.slider-next {
    right: 10px;
}

/* Slider Size Variations */
.pipedrive-slider.slider-size-small .customer-card {
    min-width: 200px;
    padding: 15px;
}

.pipedrive-slider.slider-size-small .customer-avatar {
    width: 40px;
    height: 40px;
}

.pipedrive-slider.slider-size-small .customer-info h4 {
    font-size: 14px;
}

.pipedrive-slider.slider-size-small .customer-description {
    font-size: 12px;
}

.pipedrive-slider.slider-size-medium .customer-card {
    min-width: 280px;
    padding: 20px;
}

.pipedrive-slider.slider-size-large .customer-card {
    min-width: 350px;
    padding: 25px;
}

.pipedrive-slider.slider-size-large .customer-avatar {
    width: 80px;
    height: 80px;
}

.pipedrive-slider.slider-size-large .customer-info h4 {
    font-size: 20px;
}

.pipedrive-slider.slider-size-large .customer-description {
    font-size: 16px;
}

/* Customer Card Styles */
.customer-card {
    min-width: 280px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.customer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.customer-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.customer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 3px solid #e9ecef;
    background: #f8f9fa;
}

.customer-info h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.customer-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.customer-description {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    margin-top: 10px;
}

/* Table Styles */
.pipedrive-table-container {
    margin-top: 40px;
}

.pipedrive-table-container h3 {
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
}

.pipedrive-table-wrapper {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.pipedrive-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.pipedrive-table thead {
    background: #f8f9fa;
}

.pipedrive-table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e9ecef;
}

.pipedrive-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.pipedrive-table tbody tr {
    transition: background-color 0.2s ease;
}

.pipedrive-table tbody tr:hover {
    background-color: #f8f9fa;
}

.pipedrive-table tbody tr:last-child td {
    border-bottom: none;
}

.view-details-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s ease;
}

.view-details-btn:hover {
    background: #0056b3;
}

/* Enhanced Modal Styles */
.pipedrive-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s ease;
}

.close:hover,
.close:focus {
    color: #333;
    text-decoration: none;
}

.modal-header {
    padding: 30px 30px 20px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
}

.modal-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px;
    border: 4px solid #e9ecef;
    background: #f8f9fa;
}

.modal-title h2 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.modal-title p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.modal-body {
    padding: 30px;
}

.detail-row {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-start;
}

.detail-label {
    font-weight: 600;
    color: #333;
    min-width: 120px;
    margin-right: 20px;
}

.detail-value {
    color: #555;
    flex: 1;
}

.detail-description {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state h4 {
    margin: 0 0 10px 0;
    color: #333;
}

/* Autoplay Indicator */
.slider-autoplay-indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}

.autoplay-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 123, 255, 0.3);
    transition: background-color 0.3s ease;
}

.autoplay-dot.active {
    background: #007bff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pipedrive-crm-container {
        padding: 15px;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .postcode-select {
        min-width: auto;
    }
    
    .customer-card {
        min-width: 250px;
        padding: 15px;
    }
    
    .customer-avatar {
        width: 50px;
        height: 50px;
    }
    
    .customer-info h4 {
        font-size: 16px;
    }
    
    .pipedrive-table {
        font-size: 13px;
    }
    
    .pipedrive-table th,
    .pipedrive-table td {
        padding: 10px 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .detail-row {
        flex-direction: column;
        margin-bottom: 15px;
    }
    
    .detail-label {
        min-width: auto;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .slider-controls {
        display: none;
    }
}

@media (max-width: 480px) {
    .slider-content {
        gap: 15px;
        padding: 0 15px;
    }
    
    .customer-card {
        min-width: 220px;
        padding: 12px;
    }
    
    .pipedrive-table {
        font-size: 12px;
    }
    
    .pipedrive-table th,
    .pipedrive-table td {
        padding: 8px 10px;
    }
    
    .address-filter-section {
        padding: 15px;
    }
}

/* Print Styles */
@media print {
    .pipedrive-slider,
    .slider-controls,
    .address-filter-section {
        display: none;
    }
    
    .pipedrive-table {
        border: 1px solid #000;
    }
    
    .pipedrive-table th,
    .pipedrive-table td {
        border: 1px solid #000;
    }
} 