/* Main container */
.dmp-container {
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

/* Range selector */
.dmp-selector {
    text-align: center;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.dmp-selector h2 {
    font-size: 1.5rem;
    color: var(--secondary);
}

/* Range styling */
.dmp-range {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.dmp-range-input {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: var(--secondary-10);
    border-radius: var(--radius-m);
    margin-bottom: 1rem;
}

.dmp-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dmp-range-input::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dmp-range-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.dmp-range-input::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.dmp-range-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
    font-size: 0.875rem;
    color: var(--dark-80);
}

.dmp-range-labels span {
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.dmp-range-labels span.active {
    color: var(--primary);
    font-weight: 600;
}

.dmp-range-labels span:hover {
    color: var(--primary);
}

.dmp-range-input:focus {
    outline: none;
}

/* For browsers that show outline differently */
.dmp-range-input:focus-visible {
    outline: none;
}

/* Carousel layout - UPDATED FOR 3 PLANS */
.dmp-grid-wrapper {
    position: relative;
    margin: 0 auto;
    overflow: hidden;
    padding: 1rem 0;
    max-width: 1200px; /* Control max width of container */
}

.dmp-grid {
    display: flex;
    gap: 1.5rem; /* Consistent spacing between cards */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0 auto;
    padding: 1rem;
    will-change: transform;
    touch-action: pan-x;
}

.dmp-grid::-webkit-scrollbar {
    display: none;
}

/* Card styling - UPDATED FOR 3 PLANS */
.dmp-card {
    flex: 0 0 calc(33.333% - 1rem); /* Exactly 3 columns */
    scroll-snap-align: center; /* Center the card in view */
    min-width: 280px; /* Minimum card width */
    max-width: 350px; /* Maximum card width */
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
	align-items: center;
    flex-direction: column;
    user-select: none;
    margin: 0 auto; /* Center cards in container */
}

.dmp-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
}

.dmp-card .background-waves {
    position: absolute;
    bottom: -40px;
    left: -50%;
    min-width: 300%;
    z-index: -1;
}

.background-waves path {
    fill: var(--secondary-5) !important;
}

/* Plan title and pricing */
.dmp-plan-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dmp-plan-name {
    color: var(--secondary);
    font-size: var(--text-2xl);
    font-weight: 600;
    margin: 0;
}

.dmp-price {
    color: var(--secondary);
    font-size: 1.5rem;
    font-weight: 600;
}

.dmp-price-period {
    font-size: 1rem;
    font-weight: normal;
}

.dmp-price-baseline {
    color: var(--dark-80);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Trial styling */
.dmp-trial {
    margin-top: 0.5rem;
    color: var(--secondary);
}

.dmp-trial-text {
    font-weight: 500;
    font-size: 1.125rem;
}

.dmp-trial-days {
    font-size: 0.875rem;
}

/* Features section */
.dmp-features {
    flex: 1;
    display: flex;
    flex-direction: column;
	margin-top: 3rem;
    margin-bottom: 2rem;
}

.dmp-feature {
    font-size: 1rem;
    color: var(--dark-80);
}

.dmp-feature:nth-child(2),
.dmp-feature:nth-child(3),
.dmp-feature:nth-child(4) {
    color: var(--primary);
    font-weight: 500;
}

.dmp-feature.psf-highlight {
    color: var(--secondary);
    font-weight: 500;
	margin-bottom: 0;
}

/* Navigation arrows - UPDATED */
.dmp-nav-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center; /* Center navigation buttons */
    padding: 0 1rem;
}

.dmp-nav-button {
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    color: var(--primary);
}

.dmp-nav-button:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.dmp-nav-button svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

/* Button styling */
.btn {
    width: 100%;
    padding: 0.75rem;
    margin-top: auto;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.slight {
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
}

/* Selected state */
.dmp-card.selected {
    background: var(--primary);
    color: white;
}

.dmp-card.selected .dmp-plan-name,
.dmp-card.selected .dmp-trial,
.dmp-card.selected .dmp-price,
.dmp-card.selected .dmp-feature.psf-highlight {
    color: white;
}

.dmp-card.selected .dmp-feature {
	color: yellow !important;
	font-weight: 500;
}

.dmp-card.selected .dmp-price-baseline,
.dmp-card.selected .dmp-price-period {
    color: rgba(255, 255, 255, 0.8) !important;
}

.dmp-card.selected .dmp-feature {
    color: var(--light);
}

.dmp-card.selected .dmp-feature:nth-child(2),
.dmp-card.selected .dmp-feature:nth-child(3),
.dmp-card.selected .dmp-feature:nth-child(4) {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Loading and error states */
.dmp-loading,
.dmp-error,
.dmp-empty {
    text-align: center;
    padding: 2rem;
    color: var(--dark-80);
    width: 100%;
}

.dmp-error {
    color: #e53e3e;
}

/* Dragging state */
.dmp-grid.dragging {
    cursor: grabbing;
}

/* Responsive adjustments */
@media (min-width: 1024px) {

    .dmp-grid {
        justify-content: flex-start; 
        flex-wrap: nowrap; 
        gap: 2rem;
        overflow-x: auto;
    }
    
    .dmp-card {
        flex: 0 0 calc(33.333% - 1.5rem);
        max-width: 350px;
    }
    

    .dmp-nav-buttons {
        display: flex; 
    }
    
    .dmp-grid-wrapper {
        padding: 1rem 0;
    }
}

@media (max-width: 1023px) {
    /* On tablets, show 2 plans at once */
    .dmp-grid {
        gap: 1.5rem;
    }
    
    .dmp-card {
        flex: 0 0 calc(50% - 1rem);
    }
}

@media (max-width: 767px) {
    /* Change grid to vertical layout */
    .dmp-grid {
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 1rem;
        gap: 2rem; /* Space between stacked cards */
    }
    
    .dmp-card {
        flex: 0 0 auto;
        width: 100%;
        max-width: 450px; /* Set a reasonable max-width */
        margin: 0 auto;
        scroll-snap-align: start;
    }
    
    /* Hide horizontal nav buttons on mobile */
    .dmp-nav-buttons {
        display: none;
    }
    
    /* Remove scrolling behaviors */
    .dmp-grid {
        scroll-snap-type: none;
    }
    
    /* Range input section adjustments */
    .dmp-range {
        max-width: 100%;
        padding: 1rem;
    }
    
    .dmp-range-labels {
        font-size: 0.75rem;
        overflow-x: auto;
        justify-content: space-between;
        padding-bottom: 0.5rem;
    }
    
    .dmp-range-labels span {
        padding: 2px 8px;
        white-space: nowrap;
    }
}