/* VPS Plans Horizontal Design */
.vps-plans-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.vps-plan-card {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.discount-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    z-index: 10;
    transform: rotate(15deg);
}

.vps-plan-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.plan-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.plan-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plan-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    flex-wrap: wrap;
}

.plan-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

/* Estilos para las banderas horizontales */
.server-location-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 0;
}

.location-flag {
    width: 32px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    opacity: 0.7;
}

.location-flag:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 1;
    border-color: #3b82f6;
}

.location-flag.selected {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
    opacity: 1;
    transform: scale(1.05);
}

.plan-badges {
    display: flex;
    gap: 8px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-new {
    background: #3b82f6;
    color: white;
}

.badge-ssd {
    background: #10b981;
    color: white;
}

.plan-specs {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.spec-row {
    display: flex;
    gap: 32px;
    align-items: center;
    justify-content: space-between;
}

.spec-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 140px;
    flex: 1;
}

.spec-value {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.spec-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.plan-pricing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    min-width: 200px;
    padding-left: 24px;
    border-left: 1px solid #e5e7eb;
}

.best-price-badge {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 8px;
    white-space: nowrap;
}

.price-display {
    display: flex;
    align-items: baseline;
    margin-bottom: 16px;
}

.currency {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-right: 2px;
}

.amount {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.period {
    font-size: 14px;
    color: #6b7280;
    margin-left: 4px;
}

.buy-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
}

.buy-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.buy-btn:active {
    transform: translateY(0);
}

/* Loading state */
.updating-prices {
    opacity: 0.7;
    pointer-events: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .vps-plan-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .plan-title-row {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .plan-title {
        text-align: center;
    }
    
    .server-location-flags {
        gap: 6px;
        padding: 6px 0;
        justify-content: center;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
    }
    
    .location-flag {
        width: 28px;
        height: 21px;
    }
    
    .plan-pricing {
        border-left: none;
        border-top: 1px solid #e5e7eb;
        padding-left: 0;
        padding-top: 20px;
        align-items: center;
        min-width: auto;
        width: 100%;
    }
    
    .spec-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
    
    .spec-item {
        min-width: 100px;
    }
    
    .plan-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .plan-badges {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .vps-plans-container {
        padding: 10px;
    }
    
    .vps-plan-card {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .server-location-flags {
        gap: 4px;
    }
    
    .location-flag {
        width: 24px;
        height: 18px;
    }
    
    .spec-row {
        gap: 12px;
    }
    
    .spec-item {
        min-width: 80px;
    }
    
    .spec-value {
        font-size: 14px;
    }
    
    .spec-label {
        font-size: 11px;
    }
    
    .amount {
        font-size: 28px;
    }
}

/* Animation for loading */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vps-plan-card {
    animation: fadeIn 0.3s ease-out;
}

/* Spinner styles */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}