/**
 * Constituency Picker Styles
 */

.constituency-picker {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Picker Steps */
.picker-step {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.picker-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.picker-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

/* Step 1: Map Selection */
.map-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.map-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.map-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.map-card-header {
    margin-bottom: 1.5rem;
}

.map-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.map-card-count {
    display: inline-block;
    font-size: 0.875rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.map-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-select-map,
.btn-select-bundle {
    padding: 0.75rem 1.5rem;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-select-map {
    background: #3b82f6;
    color: #ffffff;
}

.btn-select-map:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.btn-select-bundle {
    background: #ffffff;
    color: #3b82f6;
}

.btn-select-bundle:hover {
    background: #eff6ff;
}

/* Step 2: Constituency Selection */
.picker-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-back {
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: #e5e7eb;
}

.constituency-filter {
    margin-bottom: 1.5rem;
}

.constituency-search {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.constituency-search:focus {
    outline: none;
    border-color: #3b82f6;
}

.constituency-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom scrollbar */
.constituency-list::-webkit-scrollbar {
    width: 8px;
}

.constituency-list::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.constituency-list::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 4px;
}

.constituency-list::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

.constituency-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.constituency-item:hover {
    border-color: #3b82f6;
    background: #f9fafb;
}

.constituency-item.selected {
    border-color: #10b981;
    background: #ecfdf5;
}

.constituency-info {
    flex: 1;
}

.constituency-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.constituency-full-name {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.btn-select-constituency {
    padding: 0.5rem 1.25rem;
    background: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-select-constituency:hover {
    background: #2563eb;
}

.constituency-item.selected .btn-select-constituency {
    background: #10b981;
}

.constituency-item.selected .btn-select-constituency:hover {
    background: #059669;
}

/* Summary */
.picker-summary {
    display: none;
    position: sticky;
    bottom: 0;
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.picker-summary.visible {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.summary-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.summary-details p {
    margin: 0.25rem 0;
    font-size: 0.95rem;
}

.summary-price {
    font-weight: 600;
    font-size: 1.1rem !important;
}

.btn-checkout {
    padding: 0.875rem 2rem;
    background: #ffffff;
    color: #667eea;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-checkout:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* Error message */
.error {
    padding: 1rem;
    background: #fee2e2;
    border: 1px solid #ef4444;
    border-radius: 8px;
    color: #991b1b;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .constituency-picker {
        padding: 1rem 0.5rem;
    }

    .picker-title {
        font-size: 1.5rem;
    }

    .map-selection {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .constituency-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-select-constituency {
        width: 100%;
    }

    .picker-summary.visible {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-checkout {
        width: 100%;
    }

    .picker-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
